0

I have Microsoft Excel file (with macroses) for multiple users. I used to use Google sheets to store some data there and retrieve it with ActiveSheet.QueryTables.Add function. So I can update this data and all users can easily update their Excel files.

But now I want to store some data from Excel to google spreadsheet. Users are changing data in three columns all the time and I want to store those changes in separate google sheets (Each user will have different google workbook to simplify)

So I need just this: - Open google sheet https://docs.google.com/spreadsheets/d/....key..../edit#gid=0 - Select all data on the sheet and delete it - copy three columns from excel sheet - paste in google sheet at A1 those columns

I started dig how to do that but understood that it is not so simple. I`m now stack with using Internet Explorer for this:

 Dim ie As InternetExplorer
    Set ie = New InternetExplorer
    ie.Visible = True
    ie.Navigate ("https://docs.google.com/spreadsheets/d/....key..../edit?usp=sharing") 

I don’t know how to select all data on the google sheet, how delete it and how to past at A1.

When I was searching an answer to my question, I found some articles on stackoverflow, but it did not help me. They advice to use:. Use the Google Spreadsheets API to move the data into your online spreadsheet. But how to use it in VBA ? How to add this API?

Please help! Thank you in advance!

  • 1
    Possible duplicate of [How to write to a "Google Spreadsheet" from Excel 2003 VBA](https://stackoverflow.com/questions/9737354/how-to-write-to-a-google-spreadsheet-from-excel-2003-vba) – ashleedawg Jan 28 '18 at 09:28
  • 1
    Welcome to Stack Overflow! This site is a place for professional *(or enthusiast!)* programmers to share advice when a problem's solution can't be found elsewhere. Questions similar to yours have been asked & answered many times on this site and others. I don't believe Internet Explorer is the correct way to handle this -- What else have you tried? Perhaps a [Google Search](https://www.google.ca/search?num=100&q=google+sheets+from+excel+vba)? Also, check out "[ask]", and "[mcve]" and also see "[help/on-topic]",. – ashleedawg Jan 28 '18 at 09:35
  • 1
    When I was searching an answer to my question, I also found this article, but it did not help me. They advice to use:. Use the Google Spreadsheets API to move the data into your online spreadsheet. But how to use it in VBA ? How to add this API? – Eugeny Filippov Jan 28 '18 at 16:31

0 Answers0