Skip to content

Instantly share code, notes, and snippets.

  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
function ImportDataRange() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("toWorksheetName");
var ssraw = SpreadsheetApp.openById("fromSheetID");
var sheetraw = ssraw.getSheetByName("fromWorksheetName");
var range = sheetraw.getRange("rangeFrom");
var data = range.getValues();
Copy the code above.
In the destination Sheet, open the Scrip Editor and paste the code.
Change the following parameters:
line 3 - Destination worskeet name;
line 4 - Source form ID;
line 5 - Source worksheet name;
line 6 - Source data range;
line 8 - Destination data range.
Save and run script.
Check that the data are correctly copied across the source and destination sheets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment