How to create a function in script so that the column of currency data displays the currency in the email generated?Create Currency Data Type C++How to display Currency in Indian Numbering Format in PHPAndroid Currency Class - How Do you Get the Display Name for the Currency?How to display length of filtered ng-repeat dataHow to display a currency format in MVCHow to format display String to currency in C#In angular 2, how to display a number as two decimal rounded currency?How to display the currency symbol to the right in AngularGoogle Sheets Email Script ErrorR - identify which columns contain currency data $

Are Star Trek races uniform?

Why doesn't hot charcoal glow blue?

Stare long enough and you will have found the answer

I'm half of a hundred

Who inspired the character Geordi La Forge?

Why do military jets sometimes have elevators in a depressed position when parked?

What are these objects near the Cosmonaut's faces?

when to use がつ or げつ readings for 月?

How to pronounce correctly [b] and [p]? As well [t]/[d] and [k]/[g]

Would a spacecraft carry arc welding supplies?

Grade changes with auto grader

Do any languages mark social distinctions other than gender and status?

Examples of problems with non-convex constraint functions but convex feasible region

Meaning of “Bulldog drooled courses through his jowls”

Can I exit and reenter a UK station while waiting for a connecting train?

Visualize a large int

What is the maximum amount of melee weapon attacks a character can make reliably every turn?

C# Toy Robot Simulator

How does an Evocation Wizard's Overchannel ability interact with Chaos Bolt?

How can a stock trade for a fraction of a cent?

I don't want my ls command in my script to print results on screen

Is there a package that allows to write correctly times in hours, minutes and seconds in mathematical mode?

Cutting a 4.5m long 2x6 in half with a circular saw

Can set-like objects obeying ZFC be constructed in Euclidean geometry?



How to create a function in script so that the column of currency data displays the currency in the email generated?


Create Currency Data Type C++How to display Currency in Indian Numbering Format in PHPAndroid Currency Class - How Do you Get the Display Name for the Currency?How to display length of filtered ng-repeat dataHow to display a currency format in MVCHow to format display String to currency in C#In angular 2, how to display a number as two decimal rounded currency?How to display the currency symbol to the right in AngularGoogle Sheets Email Script ErrorR - identify which columns contain currency data $






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









1

















I want the total in parameter2 to be in currency format in the generated email.



I have tried to use Number Format but continue to receive an error stating my range can not be found



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 + ',nn' + message1 + ' ' +
message2 + ' ' + parameter2 + ' ' + message3;
var subject = 'Your YTD Sales';
MailApp.sendEmail(emailAddress, subject, message);




Below is an example of the email generated. I would like the 45000 to read $45,000



Dear Customer John Doe,



Customer #123456789 sales expectations were $50,000. Customer had 45000 in

actual sales.










share|improve this question




























  • You're trying to getRange for value "rowData[4]" which doesn't seem to be a valid arguement. I assume this is google sheets? Their documentation is here, looks like you can specify row/column groups. Passing a string representing an object field is not a supported arguement

    – kht
    Mar 28 at 22:57


















1

















I want the total in parameter2 to be in currency format in the generated email.



I have tried to use Number Format but continue to receive an error stating my range can not be found



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 + ',nn' + message1 + ' ' +
message2 + ' ' + parameter2 + ' ' + message3;
var subject = 'Your YTD Sales';
MailApp.sendEmail(emailAddress, subject, message);




Below is an example of the email generated. I would like the 45000 to read $45,000



Dear Customer John Doe,



Customer #123456789 sales expectations were $50,000. Customer had 45000 in

actual sales.










share|improve this question




























  • You're trying to getRange for value "rowData[4]" which doesn't seem to be a valid arguement. I assume this is google sheets? Their documentation is here, looks like you can specify row/column groups. Passing a string representing an object field is not a supported arguement

    – kht
    Mar 28 at 22:57














1












1








1








I want the total in parameter2 to be in currency format in the generated email.



I have tried to use Number Format but continue to receive an error stating my range can not be found



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 + ',nn' + message1 + ' ' +
message2 + ' ' + parameter2 + ' ' + message3;
var subject = 'Your YTD Sales';
MailApp.sendEmail(emailAddress, subject, message);




Below is an example of the email generated. I would like the 45000 to read $45,000



Dear Customer John Doe,



Customer #123456789 sales expectations were $50,000. Customer had 45000 in

actual sales.










share|improve this question

















I want the total in parameter2 to be in currency format in the generated email.



I have tried to use Number Format but continue to receive an error stating my range can not be found



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 + ',nn' + message1 + ' ' +
message2 + ' ' + parameter2 + ' ' + message3;
var subject = 'Your YTD Sales';
MailApp.sendEmail(emailAddress, subject, message);




Below is an example of the email generated. I would like the 45000 to read $45,000



Dear Customer John Doe,



Customer #123456789 sales expectations were $50,000. Customer had 45000 in

actual sales.







javascript format currency






share|improve this question
















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 22:45









kht

4701 silver badge7 bronze badges




4701 silver badge7 bronze badges










asked Mar 28 at 21:32









Lindsay HolwerdaLindsay Holwerda

61 bronze badge




61 bronze badge















  • You're trying to getRange for value "rowData[4]" which doesn't seem to be a valid arguement. I assume this is google sheets? Their documentation is here, looks like you can specify row/column groups. Passing a string representing an object field is not a supported arguement

    – kht
    Mar 28 at 22:57


















  • You're trying to getRange for value "rowData[4]" which doesn't seem to be a valid arguement. I assume this is google sheets? Their documentation is here, looks like you can specify row/column groups. Passing a string representing an object field is not a supported arguement

    – kht
    Mar 28 at 22:57

















You're trying to getRange for value "rowData[4]" which doesn't seem to be a valid arguement. I assume this is google sheets? Their documentation is here, looks like you can specify row/column groups. Passing a string representing an object field is not a supported arguement

– kht
Mar 28 at 22:57






You're trying to getRange for value "rowData[4]" which doesn't seem to be a valid arguement. I assume this is google sheets? Their documentation is here, looks like you can specify row/column groups. Passing a string representing an object field is not a supported arguement

– kht
Mar 28 at 22:57













0






active

oldest

votes













Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);














draft saved

draft discarded
















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55407170%2fhow-to-create-a-function-in-script-so-that-the-column-of-currency-data-displays%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown


























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55407170%2fhow-to-create-a-function-in-script-so-that-the-column-of-currency-data-displays%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown









Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript