▲xguru 2020-08-27 | parent | favorite | on: 구글 시트로 Core Web Vitals 매일 자동 측정하기(labnol.org)function sendEmail() { ㅤvar sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets();ㅤ ㅤfor (var i = 0; i < sheets.length ; i++ ) { ㅤㅤvar sheet = sheets[i]; ㅤㅤvar dataRange = sheet.getDataRange() ㅤㅤvar cwvRange = sheet.getRange(2,1,dataRange.getLastRow()-1,dataRange.getLastColumn()); ㅤㅤvar numRows = cwvRange.getNumRows(); ㅤㅤvar numCols = cwvRange.getNumColumns(); ㅤㅤvar message = "CWT 값"; ㅤㅤfor (var i = 0; i < numRows; i++) { ㅤㅤㅤㅤfor (var j = 0; j < numCols; j++) { ㅤㅤㅤㅤ message = message + cwvRange.getValues()[i][j] + " | " ㅤㅤㅤㅤ} ㅤㅤㅤㅤmessage = message + "\r\n" ㅤㅤ} ㅤ} ㅤMailApp.sendEmail("email@server", "이주의 Core Web Vitals", message); }
function sendEmail() {
ㅤvar sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets();ㅤ
ㅤfor (var i = 0; i < sheets.length ; i++ ) {
ㅤㅤvar sheet = sheets[i];
ㅤㅤvar dataRange = sheet.getDataRange()
ㅤㅤvar cwvRange = sheet.getRange(2,1,dataRange.getLastRow()-1,dataRange.getLastColumn());
ㅤㅤvar numRows = cwvRange.getNumRows();
ㅤㅤvar numCols = cwvRange.getNumColumns();
ㅤㅤvar message = "CWT 값";
ㅤㅤfor (var i = 0; i < numRows; i++) {
ㅤㅤㅤㅤfor (var j = 0; j < numCols; j++) {
ㅤㅤㅤㅤ message = message + cwvRange.getValues()[i][j] + " | "
ㅤㅤㅤㅤ}
ㅤㅤㅤㅤmessage = message + "\r\n"
ㅤㅤ}
ㅤ}
ㅤMailApp.sendEmail("email@server", "이주의 Core Web Vitals", message);
}