0
votes

I have a Google Sheets that I'm working with, and for reasons I'd rather not get into here I need to keep an updated copy of it in a second location. The original spreadsheet has two sheets/pages, I only need to copy from the second sheet/page to the first sheet/page of the new spreadsheet.

I have a server that can accomplish this if an API is necessary. I don't need an exact script to do it, but pointing me in the right direction would be very helpful. I'm most familiar with Python and PHP if they're needed.

1
are you going to be adding additional data / columns to the new sheet that won't be in the original?Bryan P
No, the new will be an exact copy of the old sheet, nothing changed.vaindil

1 Answers

1
votes

I'm sure there is an easier way to do it using Apps Script, but if you want something that works in the short-term while you learn Apps Script, you can use the IMPORTRANGE function and Sheets exclusively.

=IMPORTRANGE("SpreadsheetKey","Sheet!Range")

Example:

  • I created a sheet called OriginalSheet and in A1:A5 put the numbers 1 through 5.

enter image description here

  • Next, I created a separate sheet called NewSheet and in cell A1, I put the the following function (with appropriate values for my OriginalSheet filled in):

enter image description here

This method works for me. I'm in the process of learning Apps Script and will post a better method when I learn it :)