Forum Discussion
Web.Contents with dynamic file URL
- 6 years ago
I've got it working. All ive done is set all URL's as parameters, I also added a space between parameters and the & in the functions. All minor stuff so this makes me think there is more to it.
Anyway I uploaded it to my service updated the facebook file and refreshed and the clicks updated.
I've updated the pbix with your sharepoint path, here are the files again.
- primolee6 years agoHelper V
Hello aTChris,
Wahahahahahahaha!!!!! I got it working! I used Sharepoint.File with a different approach without Web.Contents and it works like a charm!
(fileName as text, filePath as text, publisherName as text) => let Source = SharePoint.Files(foldersPath, [ApiVersion = 15]), SourceBinary = Source{[Name=fileName,#"Folder Path"=filePath]}[Content], #"Imported Excel" = Excel.Workbook(SourceBinary),- First, use Sharepoint.Files to list all binary files
- With fileName and filePath parameters passed to this processor, get the dedicated binary I want
- Extract binary with Excel.Workbook
With this way, I don't need to use Web.Contents. Therefore I can use dynamic URL and there wouldn't be any problem in Power BI Service.
This will be the exact solution to my problem, maybe you can edit your solution reply with this if you want.
Thank you again for all the inspiration!