"enable editing" issue occurring in Power Query

ursua

New Member
Joined
Jan 9, 2020
Messages
19
Office Version
  1. 365
Platform
  1. Windows
Hi,
So i have two different excel files with queries in them running on csv files downloaded from a tool.
One of it is working as usual, it refreshes and everything is ok, while the second one throws an error "[Expression.Error] The key didn't match any rows in a table."
The workaround that resolves this issue is to open csv files, enable editing and then save.
The question I have is why one of the query works normally, does not require to enable editing while the second one needs to have those data files with "enable editing" option.
As long as I have this workaround it is not a problem for me, I am just curious if this is a question of some kind of settings or what.
First query (couple of first rows):
Power Query:
Source = Folder.Files("C:\folder\folder\folder"),
    #"Filtered Rows3" = Table.SelectRows(#"Source", each Text.Contains([Name], "file")),
    #"Removed Columns2" = Table.RemoveColumns(#"Filtered Rows3",{"Name", "Extension", "Date accessed", "Date modified", "Date created", "Attributes", "Folder Path"}),
    #"Invoke Custom Function1" = Table.AddColumn(#"Removed Columns2", "Transform File from file", each #"Transform File from file"([Content])),
    #"Removed Other Columns1" = Table.SelectColumns(#"Invoke Custom Function1", {"Transform File from file"}),
    #"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File from file", Table.ColumnNames(#"Transform File from file"(#"Sample File (3)"))),
    #"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{

Second:
Power Query:
Source = Folder.Files("C:\folder\folder\folder"),
    #"Filtered Rows" = Table.SelectRows(#"Source", each Text.Contains([Name], "file")),
    #"Removed Columns2" = Table.RemoveColumns(#"Filtered Rows",{"Name", "Extension", "Date accessed", "Date modified", "Date created", "Attributes", "Folder Path"}),
    #"Filtered Hidden Files1" = Table.SelectRows(#"Removed Columns2", each [Attributes]?[Hidden]? <> true),
    #"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File from file", each #"Transform File from file"([Content])),
    #"Removed Other Columns1" = Table.SelectColumns(#"Invoke Custom Function1", {"Transform File from file"}),
    #"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File from file", Table.ColumnNames(#"Transform File from file"(#"Sample File"))),
    #"Changed Type1" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"


Any idea?
 
Last edited by a moderator:

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,223,880
Messages
6,175,153
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top