Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
arvindyadav
Post Partisan
Post Partisan

[DataSource.Error] Web.Contents failed to get contents from link not found

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

6 REPLIES 6
rusgesig
Helper IV
Helper IV

Getting the same error, it's sporadic, the links all work fine.

SergeyLossev
Frequent Visitor

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}])

Hi @SergeyLossev,

 

Did not get your message. Can you please explain me properly?

 

Regards,

Arvind

v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yuezhe-msft,

 

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

"https://azureneebal-my.sharepoint.com/personal/powerbi_ms_neebal_com/Documents/Arvind/excel file nam..." or

"https://azureneebal-my.sharepoint.com/personal/powerbi_ms_neebal_com/Documents/Arvind/excel file nam..." etc

Use browser )

 

I see - 

404 NOT FOUND

 

By the way, your url in first post differ from your last one

 

Your first url is

https://azureneebal-my.sharepoint.com/personal/powerbi_ms_neebal_com/_api/web/getfilebyserverrelativ...

 

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),

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.