简体   繁体   English

从网上获取和转换Excel不会选择新添加的列

[英]Excel Get and Transform from web not picking up newly added columns

I'm using a Power Query to load in data from a Google Spreadsheet changelog capturing changes by a department within our orginisation. 我正在使用Power Query从Google Spreadsheet更改日志中加载数据,以捕获本组织内某个部门的更改。

I set it up using the method of loading the data in via CSV. 我使用通过CSV加载数据的方法进行设置。 I generated a download of the sheet from the file I want to use and use the download link to offer a webquery. 我从要使用的文件中生成了工作表的下载,并使用下载链接提供了网络查询。 This was all working as intended. 这一切都按预期进行。 For purposes of my analysis, I had to add two more columns to this sheet and thus the CSV file. 为了进行分析,我必须在此工作表中再添加两列,从而添加CSV文件。

Now, when I run the query based on the link, the new columns (7 and 8) are not being recognised in the query. 现在,当我基于链接运行查询时,查询中不会识别新列(7和8)。 If I manually set the source to 8 columns, the data that is in there does not show as well. 如果我将源手动设置为8列,则其中的数据也不会显示。

I've checked the downloaded CSV (which generates the link). 我已经检查了下载的CSV(生成链接)。 It does contain the data in Notepad and it does pickup the data as well when I load in the downloaded CSV into Power Query. 它确实包含记事本中的数据,并且当我将下载的CSV加载到Power Query中时,它也提取了数据。

It's like there's some kind of cache limiting the link to the 6 columns previously used, but I've got no clue how to work around it. 就像有某种缓存将链接限制为以前使用的6列一样,但是我不知道如何解决它。

Any help to point me in the right direction is appreciated. 感谢您为我指明正确方向的任何帮助。

Look for code similar to 寻找类似的程式码

Source = Csv.Document(File.Contents("C:\TEMP\5.csv"),[Delimiter=",", Columns=6, Encoding=1252, QuoteStyle=QuoteStyle.None])

and remove the 并删除

, Columns=6

part so that you get 部分,以便您得到

Source = Csv.Document(File.Contents("C:\TEMP\5.csv"),[Delimiter=",", Encoding=1252, QuoteStyle=QuoteStyle.None])

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM