- Таблица https://docs.google.com/spreadsheets/d/1wtVX_0nH1HwF6tCSls3NMQnmlRK8FBdRjU7wkwFBv6Y/edit?usp=sharing
- Триггер на изменение Таблицы onEdit() ОБЯЗАТЕЛЬНО регистрировать вручную от имени Владельца.
- Обсуждение https://plus.google.com/u/0/102055465088158518795/posts/85k1PxW4eK9
Last active
May 24, 2018 13:36
-
-
Save oshliaer/b179e819c0ee0f44c37bba7cfbfd4f54 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
gulpfile.js | |
src | |
node_modules | |
gapps.config.json |
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 myFunction(e) { | |
try { | |
if (!e || !e.range) return; | |
if (e.range.columnStart > 1) { | |
var targetCell = SpreadsheetApp.getActiveSheet().getRange(e.range.rowStart, 1, e.range.rowEnd - e.range.rowStart + 1); | |
/* if you want insert the date once uncomment the row below | |
* | |
**/ | |
// if(!targetCell.getValue()) | |
targetCell.setValue(new Date()); | |
} | |
} catch (err) { | |
SpreadsheetApp.getActiveSpreadsheet().toast(err.message, 'Error!!1'); | |
} | |
} |
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
{ | |
"name": "b179e819c0ee0f44c37bba7cfbfd4f54", | |
"version": "1.0.0", | |
"description": "", | |
"main": "Code.js", | |
"scripts": { | |
"start": "gulp" | |
}, | |
"repository": { | |
"type": "git", | |
"url": "git+https://gist.github.com/b179e819c0ee0f44c37bba7cfbfd4f54.git" | |
}, | |
"author": "", | |
"license": "MIT", | |
"bugs": { | |
"url": "https://gist.github.com/b179e819c0ee0f44c37bba7cfbfd4f54" | |
}, | |
"homepage": "https://gist.github.com/b179e819c0ee0f44c37bba7cfbfd4f54", | |
"devDependencies": { | |
"del": "^2.2.2", | |
"gulp": "^3.9.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment