PBIWIKI: Connectors: Connecting to a single Excel File on SharePoint Online
* NOTE: This article is based on information discovered and the hope is that it helps lead you in the right direction to resolve the issue that you are currently working. PRODUCTS INVOLVED/ POWER BI FEATURES INVOLVED
- Microsoft Power BI Desktop
- Microsoft Power BI Service (Scheduled Refresh)
- SharePoint Online
- Microsoft Excel (XLSX)
PROBLEM SCENARIO DESCRIPTION
This scenario covers the ability to connect to a Microsoft Excel (XLSX) file that resides on SharePoint Online site. In working on a solution like this, we might come across different messages when either connecting and/or attempting to refresh the Microsoft Excel file.
In my specific scenario, my customer did not see this until we attempted to schedule a refresh.
ERROR MESSAGE
This message is displayed when attempting to Schedule a Refresh in the Power BI Service. We then go to enter the credentials.
EXCEL FILE PATH EXAMPLES THAT DO NOT WORK
CAUSE
The reason that we could not see the OAUTH2 in the drop down list, is because the URL that is being utilized to point to the Microsoft Excel (XLSX) file is not one that Power BI understands.
RESOLUTION
To resolve this issue, the bad URL path to the Excel Document stored on SharePoint Online, will need to be converted to a URL that is fully understandable to Power BI.
EXCEL DOCUMENT URL FORMAT
HTTPS | SharePoint Online, will always require us to utilize HTTPS. If we do not utilize HTTPS, we will receive authentication errors. |
---|---|
SHAREPOINT ONLINE PATH | This is the first part of the URL. A SharePoint Online URL, will always end in sharepoint.com . A good example is: mycompanyname.sharepoint.com |
SITE PATH | In many occasions, documents maybe stored within a SharePoint Site. It is important to have that directly after the SharePoint Online Path. There are times, it may be two sites deep. A good example of the format for a SharePoint Site URL would be: mycompanyname.sharepoint.com/teams . |
Resolving this issue, we had to modify the bad URL to be a URL that Power BI understands.
- Bad Hyperlink: https://mycompanyname.sharepoint.com/:x:/t/my-excel-test/ETCnElhrOvBJtrAYPeMBJyYB_Xw8FyS4PeigPv82EAJ4jA?e=60ElaD
- **Power BI understanding URL: ** https://mycompanyname.sharepoint.com/my-excel-test/books1.xlsx
ADDITIONAL INFORMATION
- Get data from files for Power BI:/en-us/power-bi/service-get-data-from-files
- Get data from Excel Workbook Files:/en-us/power-bi/service-get-data-from-files
- Connect to Excel in Power BI Desktop: /en-us/power-bi/desktop-connect-excel
- Connect to CSV file in Power BI Desktop: /en-us/power-bi/desktop-connect-csv
*NOTE: This article is based on information discovered and the hope is that it helps lead you in the right direction to resolve the issue that you are currently working.