Forum Discussion
Trying to get Power BI to work with an Excel Data Source
Hi all,
I'm scratching my head over this because I feel like it shouldn't be that difficult. But it has been.
I've got a report that works fine on my computer and connects to Azure and to databases as well as an excel file. When I upload this to the service, I can't get it to refresh because my gateway is just working for the databases, and not for the excel file. I've tried a number of things from uploading this file to the one drive that was created by the group in office 365, and trying to access it there. But i've been unsuccesful there too.
Ideally the file would be in onedrive and accessible to the business users who are in that group. But when I try to connect power bi desktop, i get the message"unable to connect. We encountered an error while trying connect. Details: Access to resource is forbidden"
I'm using Get Data > Web and then pasting in the URL that is given for the one drive link.
Does anyone have any idea how to do this? I've tried looking through the forum and at videos youtube and haven't really come up with much.
Thanks!
Drew
- Anonymous7 years ago
Microsoft Support helped me find the answer. It's actually pretty easy. Just need to go to Edit Queries > Data Source Settings and you can get to all the remembered credentials.
Why though would this be hidden under the Edit Queries button is beyond me. It really needs to be displayed somewhere a little more obvious. Or maybe shown as an option under Get Data as well...
But in here I can edit the settings and clear ones that I don't want applied.
9 Replies
- blopez11
Super User
The following reference worked perfect for me
https://docs.microsoft.com/en-us/power-bi/desktop-use-onedrive-business-links
Good luck
- AnonymousNot applicable
Anonymous,
Does your dataset contain Azure SQL database data source and Excel file data source? Or you combine Azure data source, on-premises SQL database and Excel file in a single dataset?
What error message do you get when adding Excel file within on-premises gateway? You can follow the guide in this similar thread to add Excel data source.
Regards,Lydia
- AnonymousNot applicable
Thank you blopez11 and Anonymous for the tips.
The link that you provided blopez11 proved helpful for getting me to try connecting again with a file from PBI Desktop. I was able to successfully connect an Excel file to OneDrive using the in-depth walkthrough provided in this article: https://5minutebi.com/2018/04/09/power-bi-using-and-refreshing-excel-datasources-with-onedrive/
I was able to get it working with my personal OneDrive for Business account, but I really wanted it to work with the Sales Dash site that I'd set up, since this is what we're using for this project. When I try to connect to the Sales Dash OneDrive using the process that works for my personal OneDrive account, I get the error:
This error prevents me from moving any further. Here is what OneDrive looks like for me. I tried connecting from Sales Dashboard as well as from my Dev/Testing site, but I get the same error each time.
- AnonymousNot applicable
Anonymous,
It seems that you are connecting to csv file that locates on SharePoint online site. Please enter the following url instead in web connector and use organizational account. There is an example for your reference.
https:// your root site url/Shared%20Documents/your folder name/yourcsvname.csv
Regards.
Lydia- AnonymousNot applicable
Thanks Anonymous (Lydia),
But unfortunately for me, the Access Web Content page (second screen shot that you sent) no longer comes up, so I don't have the choice for organizational account any longer. I just get the error message Access to the resource is forbidden. I'm thinking that there is a bug because I believe I entered the information in once, but I chose wrong on that Access Web Content page. But now I can't get back to it.
Anyways, I'm going to put the data into a database instead of an Excel file. This should fix the issue for me, but it won't resolve the bug.
Thanks!
Drew