Forum Discussion
wrwillits
Helper III
6 years agoaccessing a file embedded on a web page
Can I access a file throught Power Query that is embedded on a web page? I am trying to set up a link to an Excel file that is embedded on a web page. I need to link to the historic and current ...
- 6 years ago
Thank you for all your help!
wrwillits
Helper III
6 years agoI get the same error message.
artemus
Microsoft Employee
6 years agoHrm... I wonder why it works if you download it locally first? You are sure if you load it locally you do not have this problem?
- wrwillits6 years ago
Helper III
I have no problems loading it locally. I've been using the data in the below BI model for the past several months (downloading it manually each moth and then refreshing the model).
- wrwillits6 years ago
Helper III
And here's confirmation that I'm running Office 365, 64 bit.
- artemus6 years ago
Microsoft Employee
Hrm.. I'm at a loss to what is happening here. I may be trying to load it in a different way since it is on the web.
Could you try:
= Excel.Workbook(Binary.Buffer(Web.Contents("https://www.eia.gov/dnav/pet/xls/PET_PRI_SPT_S1_D.xls")), null, true)
If that doesn't work, see if adding Binary.Buffer when loading your local file works:= Excel.Workbook(Binary.Buffer(File.Contents("c:\MyDownloadFolder\PET_PRI_SPT_S1_D.xls")), null, true)If the above doesn't work then it indicates there is something special happening since it is an excel file.Also, try and running your query in Excel and see if that works (Open a new Excel spreadsheet, Use Get Data, open query editor, then select all your queries in Power Bi and Control-C, then Control-V them into Excel).