Created
March 19, 2015 12:23
-
-
Save pierandrea/a02a02021adc4b5071b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
sheet.getRange("rangeTO").setValues(data) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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