Forum Discussion
DataSource.Error: An IO error occurred while trying to access the file...
- 9 years ago
Hi ccsrtw,
It seems folders exist in SharePoint online, please try the SharePoint Folder data source instead of Folder data source. See:
Best Regards,
Qiuyun Yu
v-qiuyu-msft - thanks for sticking with me!
I did everything in your last post, but it's still hitting me with the same error.
After some more digging, I discovered this post: https://medium.com/@Konstantinos_Ioannou/onedrive-powerbi-desktop-use-valid-paths-to-import-data-stored-in-onedrive-for-business-60089848e594#.s5xlmfyq9
I was able to import the file itself via Get Data > Web:
let
Source = Excel.Workbook(Web.Contents("http://companydomain-my.sharepoint/personal/user_companydomain_com/Documents/Folder/File.xlsx"), null, true)
in
SourceSo now all I need to do is step back a bit and get the name of that .xlsx file as the output. I tried:
let
Source = Folder.Files(Web.Contents("http://companydomain-my.sharepoint.com/personal/user_companydomain_com/Documents/Folder"), null, true)
in
Sourcebut no go.
Hi ccsrtw,
It seems folders exist in SharePoint online, please try the SharePoint Folder data source instead of Folder data source. See:
Best Regards,
Qiuyun Yu
- ccsrtw9 years agoAdvocate I
v-qiuyu-msft - that did it! Thank you! Wasn't able to get past the user level of the sharepoint source (company-my.sharepoint,com/personal/user_company_com/), but it did list all of the files in that directory so just needed to do a bit of filtering to get the one file I wanted.
Thanks again!
Per usual, this led into another issue. My second query which is going to use the just solved output ("MyFileName") as part of the source (Source = Excel.Workbook(Web.Contents("https://company-my.sharepoint.com/personal/user_tegna_com/Documents/x/xx/xxx/" & MyFileName), null, true),) is now spitting out this error:
Formula.Firewall: Query '2nd Query' (step '...') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.
Trying to apply this solution from Ken Puls, but no luck so far: http://www.excelguru.ca/blog/2015/03/11/power-query-errors-please-rebuild-this-data-combination/.