You have a Parameter1 so change it from Parameter2 into Parameter1
Iāve updated it as well in post #38
Hereās what Ive got -t the output of Transform Sample File - Yah
Now I have an error in FromFolder
So have you checked those steps to see where that error occurs?
Error message
The Data Model table couldnāt be refreshed:
Excel couldnāt refresh the table āFromFolderā from connection āQuery - FromFolderā. Hereās the error message from the external data source:
The Transform Sample File Query and eth FromFolder step through ok - its seems to be the Load to data Model error ā¦?
Think that might have happend when we changed to xlsx
Hereās my code for that Query, does that differ from yours?
let
Source = Folder.Files(FileFolderLocation),
#"Removed Other Columns" = Table.SelectColumns(Source,{"Content"}),
#"Filtered Hidden Files1" = Table.SelectRows(#"Removed Other Columns", each [Attributes]?[Hidden]? <> true),
#"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File", each #"Transform File"([Content])),
#"Removed Other Columns1" = Table.SelectColumns(#"Invoke Custom Function1", {"Transform File"}),
#"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File", Table.ColumnNames(#"Transform File"(#"Sample File"))),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"Date", type date}, {"In/Out", type text}, {"Name", type text}})
in
#"Changed Type"
I have an error in teh Transform Sample File Query - Navigation Step
d should teh Data D Sheet name be mentioned in this ?
No this was the issue we had before you moved to xlsx
Just to summarise
the Two Queries we have been working on step through ok but both show Load to data Model failed
When I do a data Refresh All
I get multiple instances of
and
This is where you should start to look for the solution
Hi Melissa
I have taken far more of your time than I should. as so I think I should abandon this and do it some other way. having said taht it is not good that I have taken so much of your time for no result .
is there a way forward - - could I manually combine the w workbooks into one ???
Thank You again so much for you time Your expertise is astounding.
Good Night
Kind Regards
Allister
I do believe weāve created a Forum record.
And remain convinced this can be done. So have a good nights rest and maybe revist this with fresh eyes - All the best Allister.
Good Morning ? Melissa
Thanks for your positive message - although I do not want to be known as the guy who set a forum record.
I can probably afford to spend another hour on this.
What do you think about sending a copy of your workbook - and I take all I will need to do now is just alter the parameter. I this way you will know exactly what code i am starting with.
What do you think of this approach.
Kind regards
Allister
Sure thing, here it is: eDNA - calendar to table FromFolder.xlsx (119.9 KB)
Important notes.
- The source files in the Folder need to have the extension .xlsx
- and need to have a Table called Table1, which contains the data
Hi Mewlissa
Can the workbooks have a different number of rows ?
Allister
That should be fine, now the Date FillDown step has been moved, but Iāll do another checkā¦
@AllisterB No issues, runs perfectly
Hi Melissa
Iāll carefully
Update your workbook as outlined in Post 55
Check that all workbooks have a table
Does each workbook need to have the data on a Sheet named data ?
After this Iāll let you know - may be a n an hour doing this
Allister
No the sheet name is irrelevant.
Below the files I tested with, just copies of the sample provided. You can examine them.
Place them in a folder, update the FileFolderLocation and Refresh the file from post #54.
Next youāll have to choose LoadTo and materialize the Output in a Table on a New Sheet.
File1.xlsx (14.7 KB)
File2.xlsx (13.8 KB)
Once this is completed successfully just swap the files in the Folder and Refresh the Query again.
If that is giving you issues, youāll now you have to examine the source files in the folder on what is outlined in post #55.
I hope this is helpful and youāll be able to resolve any issues more quickly.
FYI