###Copy Google Spreadsheet Values
Last active
August 29, 2015 14:23
-
-
Save oshliaer/d2079f4e0a8872386335 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var settings = [ | |
| { | |
| from: '1TdiT4vPOiSenwCNTvE3cQTKUC7w-NFKSZ0mo2F5n7Lo', | |
| to: '1TdiT4vPOiSenwCNTvE3cQTKUC7w-NFKSZ0mo2F5n7Lo', | |
| fromRange: 'ЛистА!A1:C10', | |
| toRange: 'ЛистБ!A1:C10', | |
| },{ | |
| from: '1TdiT4vPOiSenwCNTvE3cQTKUC7w-NFKSZ0mo2F5n7Lo', | |
| to: '1TdiT4vPOiSenwCNTvE3cQTKUC7w-NFKSZ0mo2F5n7Lo', | |
| fromRange: 'ЛистА!A12:C13', | |
| toRange: 'ЛистБ!A12:C13', | |
| } | |
| ]; | |
| function copyRange() { | |
| for(var i in settings){ | |
| var values = SpreadsheetApp.openById(settings[i].from).getRange(settings[i].fromRange).getValues(); | |
| SpreadsheetApp.openById(settings[i].to).getRange(settings[i].toRange).setValues(values); | |
| SpreadsheetApp.flush(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment