Pull data from Excel file on SharePoint

Hi @andywil456,

You can import data from Excel stored in SharePoint to Power BI Desktop by using “Get Data>Web” option as follows.

Based on my test, it works as expected when I enter the URL of Excel file via the option, data is imported successfully to Power BI Desktop.

Thanks,

Lydia Zhang

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.

View solution in original post

Pull data from Excel file on SharePoint
Pull data from Excel file on SharePoint

Load Excel Files from SharePoint

This is a quick tutorial on how to load Excel files from a SharePoint page.  SharePoint is a nice landing place for your data because it can be connected to the PowerBI.com service and thus can be used to schedule refreshes of data within your company (if you already have a SharePoint o365 account).

This tutorial will be a slightly different than my previous tutorials as I don’t have a publicly available SharePoint site that can be used to connect to.  So you will have to slightly adapt what I’m presenting to you to fit your particular SharePoint needs.

First you must start off with a SharePoint with a document library that includes an Excel file.

Pull data from Excel file on SharePoint
Sharepoint Location

The document library is titled SampleDocs, and the file we want to bring into PowerBI is called SampleData.

Clicking on the Home in the left navigation will take you to the home location of the SharePoint site.  Copy down the HTML site address from your browser of this location it should look similar to the following:

https://partner.onmicrosoft.com/sites/[Your Site Name]/SitePages/Home.aspx

Open up PowerBI Desktop and on the home ribbon click Get Data.  Highlight the SharePoint Folder and click Connect to continue.

Pull data from Excel file on SharePoint
SharePoint Folder Connection

Upon clicking connect you will be presented with another screen asking for the SharePoint folder location. In the URL window you will add the SharePoint site that we identified above.  However, it is important to note that you don’t need the entire web address.  Rather PowerBI only needs the specific site name, thus all that needs to be inserted into the URL field is highlighted below in Red.

https://partner.onmicrosoft.com/sites/[Your Site Name]/SitePages/Home.aspx

The ending “Sitepages/Home.aspx” can be removed.

Pull data from Excel file on SharePoint
Enter Shortened Site URL

Clicking ok will present a authentication screen.  Depending on your company or SharePoint authentication you will need to enter the credentials to log into the SharePoint Site.  You may have to try a couple different connection methods until you are able to properly connect to the SharePoint site.  In my example I had to select Organization Account then click the Sign in.  I signed in with my credentials given me via my I.T. group.  Also, I had to use the drop down to select the proper level to apply the settings.  I used the same address as listed above: https://partner.onmicrosoft.com/sites/[Your Site Name]/

Pull data from Excel file on SharePoint
User Sign In Page

After signing in click Connect to proceed.  PowerBI Desktop will then load all the files from the SharePoint site in a preview window. Click Edit to modify the query.

Pull data from Excel file on SharePoint
Query Editor View

We can now see our SampleData File and the folder path.  Each document library will be a separate folder path, thus if you have multiple document libraries then you will have all the files in those different folder paths.

Next click the double down arrows to load the excel file.

Pull data from Excel file on SharePoint
Load File

Power BI Desktop will then go to the SharePoint site and download the information inside your excel file.  For my data I have all the information retained in a table within my excel document.  The table name is call MyDataTable.  Thus, clicking on the Table link in the MyDataTable row I will be able to open all the data within this table.

Pull data from Excel file on SharePoint
Load Table of Data from Excel File

Finally the data is loaded from the excel table.  Click Close & Apply on the Home ribbon to load the data into PowerBI.

Note: It is always important to check your columns and verify that your data types are correct.  Highlight each column and make sure you select the proper Data Type for each column.  Data Type can be found on the Home ribbon. 

Pull data from Excel file on SharePoint
Final Load Data

Thanks for visiting.  Make sure you stop by again for more great tutorials.