1
votes

In Google Sheets there is an option to saved a "named version" of a sheet. I am looking for a way to do this programatically. Roughly, I want a button press to:

  • Create a new named version (eg, "v3") of a spreadsheet (data)
  • Create a copy of another spreadsheet (calculator)
  • Have calculator reference data in "v3" of data.

Is this possible? I can't find any functions to programatically create/access versions of spreadsheets. In the Drive Service, or Drive Web API.

1
Oh you meant literally different versions within gdrive, I'm sorry my info below won't help you :(J. G.

1 Answers

-3
votes

Yes, this is possible.

Steps:

  • Create calculator
  • Have calculator use data from a sheet that is an imported range from v1 (or whatever)

Scripting steps:

  • Copy calculator (DriveApp)
  • Copy v1 into v3 (DriveApp)
  • Open calculator (SpreadsheetApp)
  • Change import range function in calculator data sheet (SpreadsheetApp)