Forum

Problem changing fi...
 
Notifications
Clear all

Problem changing file in folder after Query

5 Posts
2 Users
0 Reactions
85 Views
(@usb)
Posts: 244
Honorable Member
Topic starter
 

Greetings!
I have 2 files - same table structure, different data
I inserted one file into the folder, uploaded it to POWER QUERY when importing from a folder,
 made changes to it and brought it to Excel after the changes.
Now after I replace the contents of the folder - and put the second file in the folder
I'm pressing refresh to keep the neat table updated -
But I get an error message
The key did not match any row in the table
Screenshot attached

Why does it not work ??
I would appreciate a solution, Leah

 
Posted : 25/10/2020 5:04 pm
(@mynda)
Posts: 4761
Member Admin
 

Hi Lea,

I can't read your files as I don't speak Hebrew, but that error means that the column labels in the second file don't match those that the query was built on. 

Mynda

 
Posted : 25/10/2020 7:10 pm
(@usb)
Posts: 244
Honorable Member
Topic starter
 

hi,
As for the error, how can the column labels be incorrect?
I downloaded from the system to Excel 2 files with a fixed structure - only the data is different
And even if we look at the tables now - these are the same columns, the same titles,
Only the data inside is different
So why is he still displaying this error message?
Will it help if I translate the file into English?

thank you!!!

lea

 
Posted : 26/10/2020 5:57 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Lea,

In that case it'll be other names throughout the query causing the problem. e.g. the worksheet names are different in each of those files. Did you change the reference to the worksheet name in the query editor? e.g. the Transform Sample File query contains references to the sheet name as does the Transform File function. The final query under 'other queries' also includes a reference to the original file name.

When you get files from a folder the sample file information is hard coded in the queries generated upon combining. If you remove the file used as the sample file your query will fail because it's looking for that sample file name and the sheet name for that file. You either have to rename the replacement sample file so it matches what the query is looking for, or edit the query and replace all references to the original file with the new file name and sheet name.

It's probably easier to name the replacement file with the same file name and sheet tab names. I hope that points you in the right direction.

Mynda

 
Posted : 26/10/2020 7:02 pm
(@usb)
Posts: 244
Honorable Member
Topic starter
 

Thanks for the detailed answer!
I did check and the name of the issue in both was not the same-
There was a small change I had not noticed before.
Thanks!!!!

 
Posted : 27/10/2020 4:28 am
Share: