Forum Discussion
How to connect google sheet to Power BI
Good day,
I would like to ask if how can I import google sheet to power BI?
For your assistance.
Thank you and God bless,
Christian
2023 update - the method below is no longer required, the native connector to Google Sheets is generally available. This supports Google authentication, so the data no longer needs to be public.
https://learn.microsoft.com/en-us/power-query/connectors/google-sheets
**** BELOW IS NOW OUT-OF-DATE ****
The easiest way is to Get Data / From Web, then enter the URL to your google sheet, with "&output=xls" on the end, e.g.
http://spreadsheets.google.com/pub?key=r1hlZB_n1rpXTij11Kw7lTQ&output=xls
PBI then analyses the resulting Excel file, showing the tabs as tables , which you can edit and manipulate.
72 Replies
- mike_honeyMemorable Member
2023 update - the method below is no longer required, the native connector to Google Sheets is generally available. This supports Google authentication, so the data no longer needs to be public.
https://learn.microsoft.com/en-us/power-query/connectors/google-sheets
**** BELOW IS NOW OUT-OF-DATE ****
The easiest way is to Get Data / From Web, then enter the URL to your google sheet, with "&output=xls" on the end, e.g.
http://spreadsheets.google.com/pub?key=r1hlZB_n1rpXTij11Kw7lTQ&output=xls
PBI then analyses the resulting Excel file, showing the tabs as tables , which you can edit and manipulate.
- gaillardbNew Member
Mike,
would you please help me locate the Get Data / From Web ...
Get data gives me the following options:
Import of Connect data
Files or Database
In database, I can't seem to find a way to paste a simple URL source. Thanks!!
- mike_honeyMemorable Member
gaillardb - It sounds like you are starting from app.powerbi.com ? I didnt make it clear, but actually my solution uses Power BI Desktop. That has much more "Get Data" functionality.
BTW these forums arent great - if you want someone to be notified of your reply you need to mention them eg @xyz
- JuliengNew Member
Mike,
I am affraid your option doesn't really work anymore. I haven't been able to do it.
Are you using the "shareable link" from google sheet, or the actual sheet URL ?
Thanks !
- mike_honeyMemorable Member
From Google Sheets, go to File / Publish to Web. Then change the selection from Web Page to Microsoft Excel. Copy the generated link.
- arifuddinFrequent Visitor
It only returns the first sheet? how do we get the other sheets?
- GGettyAdvocate II
I think it now takes a little more doing than just the "&output=xls" on the end of URL. Here's a robust solution that I've tested and used quite a bit to get full data out of Google Sheet. Apologies for all the steps:
1. Use Power BI desktop (this won't work just on Power BI service you have to start on desktop).
2. Share Google Sheet and get link from sharing.
3. Paste Google Sheet shared link and it will end in something like "adfe/edit?usp=sharing"
4. Remove the /edit?usp=sharing off the url
5. then add export?format=xlsx&id= where the edit/? had previously started
6. then copy and paste the long id from the first part of your url
7. the long, final URL you should use for Power BI get from web will be something like:
"https://docs.google.com/spreadsheets/d/1nWV8adkjfadkfHWDIAa3ad/export?format=xlsx&id=1nWV8adkjfadkfHWDIAa3ad"
NOTE: id after equals sign matches id from Google for share sheet. (BTW this isn't a real link just demonstration).
That's it - now you can design in Power BI desktop and publish to Power BI service on web (if needed). Only downside is there's no automatic refresh. Folks can edit / enter on Google Sheet but change won't appear in Power BI Desktop until you click refresh and won't appear in Power BI Service until you republish and overwrite. To attempt quasi-automation from a Google Sheets data source, you might want to consider saving your PBIX desktop file in your OneDrive folder since the Power BI service could update that hourly, that could potentially at least eliminate the final step in refreshing Power BI service. As soon as folks make changes to Google Sheet, you simply click refresh in Power BI Desktop which will fetch and refresh visuals based on updated data, but then just save that updated PBIX file in a OneDrive folder that is published to Power BI service and it should update automatically within an hour.
- jkaemmerlingFrequent Visitor
I just want to make a slight correction to GGetty's solution, which is AWESOME!
At step 4, DO NOT remove the slash "/" before the edit?usp=sharing
Keep it, and then do step 5 so it should look like:
""https://docs.google.com/spreadsheets/d/1nWV8adkjfadkfHWDIAa3ad/export?format=xlsx&id=1nWV8adkjfadkfHWDIAa3ad"
- DavidBenaimFrequent Visitor
This is amazing! It actually works, unlike the others
- PowerBI_ABFrequent Visitor
Hi,
Tried using this, however after building connection it doesnt load the file properly. With other methods too, constant error is this the table view has 4 columns (not part of usual data base). Even after i move ahead from preview, the actual data doesnt load
- ImkeFCommunity Champion
I've used this custom connector recently and it worked just fine:
https://www.thebiccountant.com/2017/09/24/custom-connector-import-google-sheets-oauth2-powerbi/
- MWinter225Advocate IV
- ImkeFCommunity Champion
Hi there, meanwhile the native Power BI connection to Google Sheets is in preview:
Power Query Google Sheets connector - Power Query | Microsoft Docs - HonzaRegular Visitor
Hi guys,
to connect fully securely, you can use my Power BI - Google Spreadsheets custom connector:
- mpalha04Helper III
Hi,
I successfully connected to my Google Sheets data using this connector yesterday. However, when I'm hitting refresh I get the following error messages:
No columns have changed in my source data, except that new rows got added. How can I resolve this issue?
- jkaemmerlingFrequent Visitor
Is the sheet connected to a form?
Is the column renamed in the source file?
Did anything happen to the source file that would change title, position or structure of column?
Also how many rows in the google sheet?
Open the "Advanced Editor" in Query Editor and double check all of your syntax and see if any changes are being applied to that date column in the query.
Last piece of advice which usually yields results for me: walk backwards step-by-step of all your data prep steps and see if you can deduce a pattern or where the error ocurred. Usually the errors are so miniscule us humans miss them.
- AnonymousNot applicable
Hello,
is there any possibility to connect google sheet if i do not have access to Google API (company limitation).
and i can not setup document availible to anybody (as well company limitation).
in fact when i insert the link, it gives me an erreur and i can see in Web View that Google indentification required.
- jonas123Regular Visitor
Hi!
I had the same issue - what I did was that I created the project from my private Google Account. You can create a project, add the API:s and download the credentials. Then you just have to share the Sheet with the email in the credentials you downloaded! 🙂
- komyjiFrequent Visitor
hi, i have created a workbook on google sheets and i want to link it to power bi. This works for me, but as soon as I publish the report to power bi online and share it with someone, the data is not automatically updated. Is it possible to publish the report online and at the same time to update the data from the google workbook? Thanks
- adelheniHelper III
Hi, i found this article that details how to connect google sheets and power bi.
https://windsor.ai/how-to-connect-power-bi-to-google-sheets/ - birddragonmanNew Member
This video solve the issue https://youtu.be/3jgdk9rVPw0?feature=shared