Google 스프레드 시트에서 다음과 같은 작업을 수행하고 있습니다.Google 스프레드 시트에서 값이 변경되면 이메일을 보냅니다.
- 셀에서 값이 변경되면 이메일을 보냅니다. (값 = 완료).
- 데이터를 전자 메일에 컴파일하십시오. 아래 코드에서 형식을 참조하십시오.
- 정보를 확인하는 메시지가 표시됩니다.
- 예인 경우 아래 코드의 활성 사용자와 미리 설정된 사용자에게 전자 메일을 보내십시오.
- 이것은 선택 사항입니다. 열 (P)의 행을 16 행으로 전자 메일 전송 + 타임 스탬프로 업데이트하십시오.
안녕 방탄복,
시도는 사용자가 제공 한 코드를 구현하는,하지만 난 다 무슨 필요에 맞게 수정하는 작업에 머리 또는 꼬리를 만들 수 없습니다.
워크 플로를 다시 설명하겠습니다. 열 K.
부분의 샘플 코드의 값이 변경 열 K
var sheetNameToWatch = "Active Discs";
var columnNumberToWatch = 14; // column A = 1, B = 2, etc.
var valueToWatch1 = "Completed";
var valueToWatch2 = "in progress";
try{
var ss = e.source;
var sheet = ss.getActiveSheet();
var range = e.range;
if (sheet.getName() == sheetNameToWatch && range.columnStart ==
columnNumberToWatch && e.value == valueToWatch)
var confirm = Browser.msgBox
('Email will be sent Team X. Do you want to sent this email?', Browser.Buttons.YES_NO);
if(confirm!='yes'){return};
// if user click NO then exit the function, else move data
이 이메일은 특정 행의 지정된 값을 포함합니다 볼 때
이메일을 보냅니다. 전의. 열 A, B, C, D, E, F, G, H, I의 값 J. 는//Email to be sent if **Inprogess** value is a match:
Var sendEmailTeamA(){
var ProjectName = e.values[0];
var ProjectId = e.values[1];
var ProjectManager = e.values[3];
var Sales = e.values[4];
var Client = e.values[5];
var DiscType = e.values[6];
var DVDFlash = e.values[7];
var Phase = e.values[8];
var Encryption = e.values[9];
var Qty = e.values[11];
var DueDate = e.values[12];
var SpecialInstructions = e.values[13];
var emailAddress = '';
var subject = "DVD Request - " + ProjectName + " " + ProjectId;
var emailBody = "Hi Venue Colombo Team,"
"\n\nThe following data room(s) will need a disc creation. Please begin bulk save data room and create ISO to upload to the FTP site: " +
"\nProject Name: " + ProjectName +
"\nProject ID: " + ProjectId +
"\nProject Manager: " + ProjectManager +
"\nPhase: " + Phase +
"\nDisc Type: " + DiscType +
"\nEncryption: " + Encryption +
"\nQuantity: " + Qty +
"\nClient Due Date: " + DueDate +
"\nSpecialInstructions: " + SpecialInstructions;
var htmlBody = "Thank you for your <b>Club Ambassador Program</b> report submitted on <i>" + timestamp +
"</i><br/> <br/>Person Show Submitted this email: " +
"<br/><font color=\"red\">Your Name:</font> " + activeSessionuser +
"<br/>Your Email: " + toAddress;
var optAdvancedArgs = {name: "Club Ambassador Program", htmlBody: htmlBody};
MailApp.sendEmail(emailAddress, subject, emailBody, optAdvancedArgs);
}
//Email to be sent if **“Completed”** value is a match:
Var sendEmailTeamB() {
var ProjectName = e.values[0];
var ProjectId = e.values[1];
var ProjectManager = e.values[3];
var Sales = e.values[4];
var Client = e.values[5];
var DiscType = e.values[6];
var DVDFlash = e.values[7];
var Phase = e.values[8];
var Encryption = e.values[9];
var Qty = e.values[11];
var DueDate = e.values[12];
var SpecialInstructions = e.values[13];
var emailAddress = '';
var subject = "DVD Request - " + ProjectName + " " + ProjectId;
var emailBody = "Hi Venue Colombo Team,"
"\n\nThe following data room(s) will need a disc creation. Please begin bulk save data room and create ISO to upload to the FTP site: " +
"\nProject Name: " + ProjectName +
"\nProject ID: " + ProjectId +
"\nProject Manager: " + ProjectManager +
"\nPhase: " + Phase +
"\nDisc Type: " + DiscType +
"\nEncryption: " + Encryption +
"\nQuantity: " + Qty +
"\nClient Due Date: " + DueDate +
"\nSpecialInstructions: " + SpecialInstructions;
var htmlBody = "Thank you for your <b>Club Ambassador Program</b> report submitted on <i>" + timestamp +
"</i><br/> <br/>Person Show Submitted this email: " +
"<br/><font color=\"red\">Your Name:</font> " + activeSessionuser +
"<br/>Your Email: " + toAddress;
var optAdvancedArgs = {name: "Club Ambassador Program", htmlBody: htmlBody};
MailApp.sendEmail(emailAddress, subject, emailBody, optAdvancedArgs);
}
는
은 컬럼에 적용이 흐름은 K가 L은 M이 N은, O. 이메일이 전송 될 코드의 미리 설정된 이메일 주소로 이것으로 조금 더 나아 졌으면 좋겠습니다. 시간과 도움을 주셔서 다시 한 번 감사드립니다. 내가 얻을 수
나는 완전한 코드를 제공하고 싶지만 그 결과를 테스트하기 위해 스프레드 시트를 처음부터 새로 만들려면 너무 많은 작업을해야한다. 아마도 SS를 공유 할 수 있을까? 코드를 테스트 할 수 있습니까? –
실제 테스트 시트입니다. https://docs.google.com/spreadsheet/ccc?key=0Ag8NytPhOo00dER6WG1PQ3g3V1hCbnVUaTJUZDFZenc&usp=sharing – WallyG
일요일에 온라인으로 다시 연락하여 문제를 해결해 드리겠습니다. – WallyG