Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //нужно включить Drive Api в сервисах
- function getLastUpdateDates() {
- let sh = SpreadsheetApp.getActive().getSheetByName('>>');
- sh.getRange("b3:b" + sh.getLastRow()).getValues()
- .forEach((t, i) => {
- let date;
- try {
- date = new Date(Drive.Files.get(getIdFromUrl(t[0]), {supportsTeamDrives: true }).modifiedDate)
- } catch (err) {
- date = err;
- }
- sh.getRange("Q" + (i + 3)).setValue(date);
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement