Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi Team,
When I pooled my excel sheet from onedrive files by using loop then I got an error like
[DataSource.Error] Web.Contents failed to get contents from 'https://azureneebal-my.sharepoint.com/personal/powerbi_ms_neebal_com/_api/web/getfilebyserverrelativ...' (404): Not Found
Please help me out.
Regards,
Arvind
Getting the same error, it's sporadic, the links all work fine.
Url you request is unavailable
Add ManualStatusHandling to Web.Contents function. There should be a description on your error
Like this
Web.Contents(YOUR_URL, [ManualStatusHandling={400..499}])
I know this is way late, but I came across your suggestion while experiencing the same issue. It allowed me to see the exact error it was encountering, which helped me tremendously. I was chasing my tail before this. Thank you!
@arvindyadav,
What specific Power Query code do you use to connect to Excel in Power BI Desktop? Please help to describe more details about your connection process.
Regards,
Lydia
Hi @Anonymous,
I am using Onedrive for business for connection and blank query for calling new excel file into it.
The following steps are :-
(i as number) as table =>
let
Source = Excel.Workbook(Web.Contents("https://azureneebal-my.sharepoint.com/personal/powerbi_ms_neebal_com/Documents/Arvind/excel file name" & Number.ToText(i) & ".xlsx"), null, true),
#"detailed_call_report_13-12-2017_Sheet" = Source{[Item="detailed_call_report_13-12-2017",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(#"detailed_call_report_13-12-2017_Sheet", [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"call_start_time", type datetimezone}, {"call_end_time", type datetimezone}, {"call_created_by_employee", type text}, {"call_time_in_secs", Int64.Type}, {"customer_id", Int64.Type}, {"customer_name", type text}})
in
#"Changed Type"
After that you need to get data -> Blank query -> {1..10}
It gives list like,
1
2
3
.
.
10
Convert it to table after that add custom column first table([i])
Close and apply.
In above bold letter indicates that I have edited in advance editor to call multiple excel file into power bi desktop from OneDrive for business.
If you want anymore explanation then fell free to mail me.
Regards,
Arvind
First check if these files are available at urls
Use browser )
I see -
404 NOT FOUND
By the way, your url in first post differ from your last one
Your first url is
But url in M-code is
"https://azureneebal-my.sharepoint.com/personal/powerbi_ms_neebal_com/Documents/Arvind/excel file name" & Number.ToText(i) & ".xlsx"
Try to change this line
Source = Excel.Workbook(Web.Contents("https://azureneebal-my.sharepoint.com/personal/powerbi_ms_neebal_com/Documents/Arvind/excel file name" & Number.ToText(i) & ".xlsx"), null, true),
to this one
Source = Excel.Workbook(Web.Contents("https://azureneebal-my.sharepoint.com/personal/powerbi_ms_neebal_com/_api/web/getfilebyserverrelativeurl('/personal/powerbi_ms_neebal_com/Documents/Arvind/Detail%20Call%20Report%20" & Number.ToText(i) & ".xlsx')/$value", [ManualStatusHandling={400..499}]), null, true),