Forum Discussion

Carreira's avatar
Carreira
New Member
2 years ago
Solved

DataSource.Error: The downloaded data is HTML, which isn't the expected type - Personal One Drive

Hi everyone,

 

8 months ago I have created a report in Power BI and I used as databases some excel files I have in my personal OneDrive, to do that I had to go to OneDrive and embed the Excel file, so I could use its link (with some minor chages: for example replacing "embed" to "download") as database coming from Web.

 

 

 

It was working perfectly fine, but last week the error below started and I can't see the report anymore. Can anyone help please?

 

DataSource.Error: The downloaded data is HTML, which isn't the expected type. The URL may be wrong or you might not have provided the right credentials to the server.

 

 

Note: 

- I've tried to clear permissions, it doesn't work.

- I can open the source file directly without any problem so it doesn't look lika a permission issue on OneDrive.

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Carreira 

    The error message you’re seeing, “The downloaded data is HTML, which isn’t the expected type,” suggests that Power BI is receiving an HTML page instead of the expected Excel file. 

    Navigate to your OneDrive. Select the ellipses (...) to open the More menu, then select Details. In the More details pane that appears, select the copy icon next to Path. Ensure the link ends in .xlsx (for Excel files). Please refer to this link for more: Use OneDrive for work or school links in Power BI Desktop - Power BI | Microsoft Learn


     

    Best Regards,
    Jarvis Tang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

8 Replies

  • Hey rajendraongole1 - looks like you were right and the link was changed, but with the new link still gets same error in PBI.

     

    This is how it was before (when everything was working perfectly before the mentioned error happened):

     

     

    Now I got back to the file and clicked on "Embed" and the link is looking like this:

     

     

    Note that in the first image the link was in the format:

    https://onedrive.live.com/download?resid=XXXXXXXXXXXXXXXXXXX&authkey=!AK8y_NkpzrR_qu0&em=2

     

    But now the format is:

    https://1drv.ms/x/c/YYYYYYYYYYYYY/YYYYYYYYYY

     

    And I am trying to replace the link in the source of my BI with this new link (everything that are under the " "), but same error happens. Any clue?

    • AmmarYB's avatar
      AmmarYB
      New Member

      I am facing the exact same problem. any help or support would be highly appreciated.

      • Syndicate_Admin's avatar
        Syndicate_Admin
        Administrator

        Hello

        Did you manage to solve it?

        If you managed to solve it, could you share the solution please.

        Thanks in advance!!

  • Hi Carreira - as per your snapshots, possibly due to changes in OneDrive or the file's access permissions. 

    Go to your OneDrive and navigate to the Excel file>>Right-click on the file and select "Embed" or "Copy Link">>If you select "Copy Link," ensure that the link is set to allow anyone with the link to view or download the file>>Ensure the link ends in .xlsx (for Excel files) and not something like .aspx, which would be a web page rather than a file.Clear any cached permissions in Power BI related to the OneDrive link also check on the file is still shared appropriately with the necessary permissions.

     

    after that you can update the link in In Power BI Desktop, go to Transform Data > Data Source Settings.

     

    Hope this information helps.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Carreira 

    The error message you’re seeing, “The downloaded data is HTML, which isn’t the expected type,” suggests that Power BI is receiving an HTML page instead of the expected Excel file. 

    Navigate to your OneDrive. Select the ellipses (...) to open the More menu, then select Details. In the More details pane that appears, select the copy icon next to Path. Ensure the link ends in .xlsx (for Excel files). Please refer to this link for more: Use OneDrive for work or school links in Power BI Desktop - Power BI | Microsoft Learn


     

    Best Regards,
    Jarvis Tang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • After thinking about the problem "The downloaded data is HTML, which is not the expected type. etc etc", I have found that it does not work for OneDrive Personal but it does work for OneDrive Business. I checked it out.

    Now the question is, why?