Forum Discussion
Schedule Refresh of Excel files in folder
- 8 years ago
I was able to solve it with this workaround: https://www.excelando.co.il/en/power-bi-cant-schedule-refresh-when-source-is-multiple-excel-files/
It's really amazing that MS hasn't added this feature to the gateway yet.
So I created another function using where I get the content of the files in the folder instead of looping then with folder and filename.
Function:
(Content) => let Source = Excel.Workbook(Content), Sheet = Source{[Item="NameOfSheetToLoad",Kind="Sheet"]}[Data], PromotedHeaders = Table.PromoteHeaders(Sheet, [PromoteAllScalars=true]) in PromotedHeadersand then invoke the function to load my table:
let Source = Folder.Files("FolderName"), InvokeCustomFunction = Table.AddColumn(Source, "Custom", each fnGetContent([Content])), ... ... in NameOfFinalStep
I was able to solve it with this workaround: https://www.excelando.co.il/en/power-bi-cant-schedule-refresh-when-source-is-multiple-excel-files/
It's really amazing that MS hasn't added this feature to the gateway yet.
So I created another function using where I get the content of the files in the folder instead of looping then with folder and filename.
Function:
(Content) =>
let
Source = Excel.Workbook(Content),
Sheet = Source{[Item="NameOfSheetToLoad",Kind="Sheet"]}[Data],
PromotedHeaders = Table.PromoteHeaders(Sheet, [PromoteAllScalars=true])
in
PromotedHeaders
and then invoke the function to load my table:
let
Source = Folder.Files("FolderName"),
InvokeCustomFunction = Table.AddColumn(Source, "Custom", each fnGetContent([Content])),
...
...
in
NameOfFinalStep
Hi sdjensen ,
I am having the same problem and cant seem to figure out the solution even after tryin to replicate your solution.
When you use the Content function you invoke the function on the column Content, but where is this column coming from.
Can you please have a look at the following thread and suggest a solution.
https://community.powerbi.com/t5/Service/Gateway-Issue/m-p/1161835#M99431
Thank you,
Vishesh Jain