是否可以
在更新引用特定单元格的工作表时发送通知?
我要引用的单元格,比如 C15,是静态的,包含文本。
因此,当提交表单/更新电子表格时,将收到一封电子邮件,上面写着"VA电子表格已更新:本月您的附加值明显低于/高于平均水平。从单元格 C15 中获取此文本。
谢谢
缓慢
此代码应负责通过电子邮件向您发送从表单计算的详细信息。
/* Paste the below code in your spreadSheets Tools > ScriptEditor
Then setup trigger for on onFormSubmit in ScriptEditor
Resources > Current Project Triggers > Add New Triggers > from Spreadsheet > on Form Submit
Remember to change the "Your email ID here" to email ID you need the mail to send the email
*/
function emailMileage() {
var ss = SpreadsheetApp.getActive();
var sheet = ss.getSheetByName("Update");
var userEmail = "your Email ID here"
var sendername = "Mileage App"
var subject = "Your Mileage:";
if(sheet != null){
// This combines the values from three cells in update sheet with a space
var message = sheet.getRange(1,1,3,1).getValues().join(" ");
} else {
var message = "Unable to find update Sheet!"
}
MailApp.sendEmail({
to: userEmail,
name: sendername,
subject: subject,
htmlBody: message
});
}