Forum Discussion
BUG: SharePoint.Files + Excel.Workbook loads data but fails during model load
This appears to be a regression in Power BI Desktop.
I am using SharePoint.Files to access an Excel file, then Excel.Workbook to extract a sheet.
Behavior:
- Data previews correctly in Power Query
- Tables load enough to update visuals
- However, Power BI still shows:
"An error occurred while loading to the model"
This occurs consistently across multiple tables.
Steps to reproduce:
1. Get Data → SharePoint Folder
2. Select Excel file
3. Extract sheet using Excel.Workbook([Content])
4. Remove Content column and flatten data
5. Close & Apply
Expected:
Table loads successfully
Actual:
Table appears valid and is usable in visuals,
but load dialog shows failure with no detailed error.
Notes:
- Binary.Buffer applied before Excel.Workbook
- Single file and single sheet selected
- No row-level errors present
- Same file works correctly with File.Contents
This suggests an issue with SharePoint.Files connector evaluation during model load.
Has anyone else seen this behavior recently?
Update: I went so far as to uninstall and reinstall Power BI and it did not help.
Hi ferdilda,
Thank you for reaching out to the Microsoft Fabric Community Forum. Also, thanks to Kagiyama_yutaka, pallavi_r, for those inputs on this thread.
Thanks for clarifying. If the file is stored only in SharePoint Online, then it is expected that you won't be able to access it through File.Contents, as File.Contents requires a local or network file path and cannot browse SharePoint document libraries. That would explain why the file does not appear when attempting to use File.Contents, even though another user reported being able to load the workbook using that method.
Given that the data previews correctly in Power Query, there are no row-level errors, and another user was able to load the workbook through File.Contents, the workbook itself does not appear to be the issue. I would recommend testing the same file using SharePoint.Contents instead of SharePoint.Files, as SharePoint.Contents navigates directly through the document library and can help determine whether the behavior is specific to the SharePoint.Files connector. If the file loads successfully through SharePoint.Contents, that will strongly suggest the issue is related to SharePoint.Files rather than the Excel file or query transformations. Additionally, clearing the Power BI Desktop cache and re-authenticating the SharePoint data source are worthwhile steps to rule out any cached connection or credential-related issues.
7 Replies
- pallavi_rSuper User
Hi ferdilda
You could try using SharePoint.Contents instead of SharePoint.Files. SharePoint.Files enumerates all files across the site, whereas SharePoint.Contents navigates the folder hierarchy directly. Since the data previews correctly and the issue appears during model load, it may be worth testing whether the behavior changes when accessing the file through SharePoint.Contents and let me know if any issues you are facing with sharepoint.contents.
Thanks,
Pallavi
- ferdildaFrequent Visitor
File.Contents does not show the file unfortunately, I tried that.
- Kagiyama_yutakaResponsive Resident
Same file loads to the model only when the last step is File.Contents. With SharePoint.Files, preview is fine but the model load stops.
- ferdildaFrequent Visitor
Yes, exactly that, but I can't even get it from File.Contents, the file I want doesn't show up there 😞
- v-kpoloju-msftCommunity Support
Hi ferdilda,
Thank you for reaching out to the Microsoft Fabric Community Forum. Also, thanks to Kagiyama_yutaka, pallavi_r, for those inputs on this thread.
Thanks for clarifying. If the file is stored only in SharePoint Online, then it is expected that you won't be able to access it through File.Contents, as File.Contents requires a local or network file path and cannot browse SharePoint document libraries. That would explain why the file does not appear when attempting to use File.Contents, even though another user reported being able to load the workbook using that method.
Given that the data previews correctly in Power Query, there are no row-level errors, and another user was able to load the workbook through File.Contents, the workbook itself does not appear to be the issue. I would recommend testing the same file using SharePoint.Contents instead of SharePoint.Files, as SharePoint.Contents navigates directly through the document library and can help determine whether the behavior is specific to the SharePoint.Files connector. If the file loads successfully through SharePoint.Contents, that will strongly suggest the issue is related to SharePoint.Files rather than the Excel file or query transformations. Additionally, clearing the Power BI Desktop cache and re-authenticating the SharePoint data source are worthwhile steps to rule out any cached connection or credential-related issues.- v-kpoloju-msftCommunity Support
Hi ferdilda,
Just wanted to follow up. If the shared guidance worked for you, that’s wonderful hopefully it also helps others looking for similar answers. If there’s anything else you'd like to explore or clarify, don’t hesitate to reach out.Thank you.
- v-kpoloju-msftCommunity Support
Hi ferdilda,
Just wanted to follow up. If the shared guidance worked for you, that’s wonderful hopefully it also helps others looking for similar answers. If there’s anything else you'd like to explore or clarify, don’t hesitate to reach out.Thank you.