Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Запись даты изменения ячейки
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
You can’t perform that action at this time.