Automatically import data into excel from Google sheets

1

1

I use the importrange feature to import data from one Google sheet workbook to another. Does anybody know if it's possible to import and populate a cell from a Google sheet workbook cell into an excel cell using import external data feature or something like the Google sheets importrange feature?

Hip Priest

Posted 2018-01-26T18:26:27.763

Reputation: 11

Answers

0

If your Excel files are in your computer, seems the Rajesh S answer is the best. But if your files are on the cloud, you can use add-ons for Google Sheets to create this "live stream" from the Google Sheets to Excel files, even if the files are closed.

Jonatan Gomes da Silva

Posted 2018-01-26T18:26:27.763

Reputation: 1

-1

You can use the following VBA code to import Google Sheet into Excel.

Sub importGSheet()
    With ActiveSheet.QueryTables.Add("URL;https://docs.google.com/spreadsheet/ccc?key=0Ah4Bis8FTYfCdDJILVdYOG1EZEYtc1N3NF96dHZSYkE&usp=sharing#gid=0", Destination:=Range("$A$1"))
        .WebTables = "2"
        .Refresh False
    End With

End Sub

Hope this help you.

Rajesh S

Posted 2018-01-26T18:26:27.763

Reputation: 6 800

Write your concern to down vote !! – Rajesh S – 2018-11-21T05:39:44.923

I'm not the one who downvoted you, but the code just didn't work for my google sheet (it imported something, but not the data on my sheet) and your answer doesn't make it clear when it's supposed or not supposed to work – Nickolay – 2019-03-15T16:55:04.373

This worked for me though: https://stackoverflow.com/a/35802503/1026

– Nickolay – 2019-03-15T17:14:29.207

@Nickolay, thanks for feed back ,, could you please write what error you have received , help me to fix it. – Rajesh S – 2019-03-16T05:13:21.903

Didn't get an error, the imported data had a warning about Google Finance tickers(?!) followed by a few cells of the first row of the spreadsheet... – Nickolay – 2019-03-16T13:37:54.583

Reposted from a non-answer originally posted by COW: I tried Rajesh S's code and replaced the URL with the URL of my workbook, but it wasn't working as expected (it imported an advert and just the sheet names from my Google Sheet, however, the code worked for me after I updated the destination range to match the size of my Google Sheet and I changed the "webtables" line to: << .WebTables = "1" > – karel – 2020-02-25T11:18:34.300