Skip to content

Instantly share code, notes, and snippets.

@oshliaer
Last active May 24, 2018 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oshliaer/b179e819c0ee0f44c37bba7cfbfd4f54 to your computer and use it in GitHub Desktop.
Save oshliaer/b179e819c0ee0f44c37bba7cfbfd4f54 to your computer and use it in GitHub Desktop.
Запись даты изменения ячейки
gulpfile.js
src
node_modules
gapps.config.json
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');
}
}
{
"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