我希望参数2中的总数在生成的电子邮件中采用货币格式。
我尝试使用数字格式,但继续收到错误消息,指出找不到我的范围
function sendArticleCountEmails() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.setActiveSheet(ss.getSheetByName("Send-Emails"));
var sheet = SpreadsheetApp.getActiveSheet();
var dataRange = sheet.getRange("A2:F5");
var data = dataRange.getValues();
for (i in data) {
var rowData = data[i];
var emailAddress = rowData[1];
var recipient = rowData[0];
var message1 = rowData[2];
var message2 = rowData[3];
var parameter2 = rowData[4];
var message3 = rowData[5];
//Number Format
var dataRange = sheet.getRange("rowData[4]");
column.setNumberFormat('$');
var message = 'Dear Customer ' + recipient + ',\n\n' + message1 + ' ' +
message2 + ' ' + parameter2 + ' ' + message3;
var subject = 'Your YTD Sales';
MailApp.sendEmail(emailAddress, subject, message);
}
}
以下是生成的电子邮件的示例。我希望45000能读45,000美元
尊敬的客户John Doe,
客户#123456789的销售预期为50,000美元。客户有45000 in
实际销售额。