0
배경색 (bgColor)에 따라 Google Sheet의 셀 범위를 검사해야합니다. bgColor가 빨간색이면 전자 메일 주소 (공동 작업자의 목록)로 전자 메일을 보내야한다고 가정 해 봅시다.이메일 보내기 bgColor
배경색 (bgColor)에 따라 Google Sheet의 셀 범위를 검사해야합니다. bgColor가 빨간색이면 전자 메일 주소 (공동 작업자의 목록)로 전자 메일을 보내야한다고 가정 해 봅시다.이메일 보내기 bgColor
이것은 정말 간단한 것입니다. 저는 로거를 사용하여 시트에있는 셀 색상 코드를 알았습니다.이 경우 빨간색은 코드 #fff2cc
인데 순수한 빨강이 아니기 때문에 색상이 눈에 since니다. 나를 위해 빨간색처럼 ;-)
function myFunction() {
var sh = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var bg = sh.getDataRange().getBackgrounds();
for(var n = 0 ; n<bg.length;n++){
Logger.log(bg[n][0]);
if (bg[n][0] == '#fff2cc'){ // I checked only column A (index 0), change here for other column
var bgCol = n+1;
MailApp.sendEmail(Session.getEffectiveUser().getEmail(),'test color','BGcolor in cell A'+bgCol+' is #fff2cc !');
}
}
}
대단히 감사합니다. 나는 그것에 대해 살펴볼 것이다. – damian1baran