Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Get Excel file from website

I'm trying to get a file from a password protected website.

The website URL has the format bellow. If I load the page in a browser, both URLs download a .xslx file.

URL 1:   https://website.com/generateexcel/file

URL 2:   https://website.com/generateexcel/file.xslx

I already tried the Web Connector but it returns the errors:

For URL 1:

For URL 2:

Now I'm trying by Power Query. I think that something like that  in the link bellow should work, but I don't know how to write the right code.

Solved: Web.Contents with the Content option is only suppo... - Microsoft Power BI Community

The .xlsx file has a sheet named "Funcionários", from where comes the data.

Someone could please help me writing the right query?

Thanks!!

1 Reply

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi Anonymous 

     

    As it's a password protected website, which authentication type do you use to log in? If it's Basic authentication, you may try going to File > Options and settings > Data source settings. Select this data source and click Edit permissions > Edit, see if there is basic authentication choice there? If there is, enter your username and password there and see what will happen then. 

     

    If you cannot select Basic authentication in Data source settings, you may try the method in this blog: Using Power Query to get data from an API that uses a Username and Password combination - FourMoo and Power BI

     

    If both of above methods fail, as this is a thrid-party website and Power BI doesn't have a built-in connector for it. You might need to have a custom connector to get data from it. 

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.