2
votes

I am trying to import data into an Excel spreadsheet from a published Google sheet. I have published the Google sheet and copied the URL.

When I try and use that URL in my Excel spreadsheet, either with VB code or by standard Data Get External data From Web it asks me to log-in to Google. How can I get the data without having to log-in.

2
What are the privacy settings on your Google Sheet? Have you set it to be publicly accessible from the web?danmullen
Second @danmullen's opinion. Is it public? If possible, how does your code access it? Via the public "shared" link, or maybe the link you provided is from the "inside" while you were logged in?NullDev
The privacy settings are "Anyone with the link can view". Should not require login.Mike Eburne
Second question: This is exactly what I do:Mike Eburne
Opps sorry pressed CR too early... this is what I do... 1) Set shared permisssion to 'Anyone with the link can view"... 2) Go into the Google Sheet and publish it... 3) Copy the published URL (from the box at the bottom) and use this in my VB code or, for that matter, use it with standard Excel get external data from web function.Mike Eburne

2 Answers

5
votes

You can select in Google Sheets to publish as a CSV file

Then in excel use Data -> import FROM TEXT (not from web)

Paste in the link to the google sheets csv file

This should read and recognise the file, you will need to configure headers, and the Comma as the separator, format etc

Then finally one it has been imported if you go to Data -> connections you can change refresh times etc

0
votes

If you are willing to use an add-in, you can have Excel and Google Sheets stay in synch.

Data Everywhere makes add-ins for Google Sheets and Excel that allows you to sync data between Google Sheets and Excel. You just highlight the data you want to synchronize, and both your Excel spreadsheets and your Google Sheets spreadsheets will always be in sync.

You can get it at Data Everywhere, or from the Google Sheets Add-in store at https://chrome.google.com/webstore/detail/data-everywhere/foenaaepondggfpfonagpmdaggmpdeel?hl=en-US

Unfortunately, this add-on no longer works.