Home > front end >  Copying an automatically created tab to another google sheet file
Copying an automatically created tab to another google sheet file

Time:04-28

I'm working in the Google sheets on two files.

  • The first one is the output from a database and it's automatically refreshed every hour. When it's refreshed, it's saved as a separate tab named with the timestamp. The previous tab (the one with the data from the previous refresh) is deleted.
  • The second one contains some calculations based on the data from the first file. I copy the data from the first file to the second one, because I can't modify the data in the first one. Currently it's done manually by me.

My question is: is it possible to automate copying the data from the first file to the second one so that the second file will always have up to date data? If yes, can you please show how can I do it?

CodePudding user response:

You can also try this (which actually a modified version given by player0)

=IMPORTRANGE("url_of_sheet_or_id"; "A1:C10")

You mention: "The first one is the output from a database"
When no sheet is defined, Google Sheets will pick up ranges from the first sheet.

Prerequisite

The most recent sheet must be the first one (far left).

If it isn't, you should "direct" your database to place the most recently created sheet as the very first one (or use a script).

CodePudding user response:

use IMPORTRANGE. example:

=IMPORTRANGE("url_of_sheet_or_id"; "sheet_name!A1:C10")
  • Related