Greetings Apps Script Community,
I want to align data in three columns in emails to be sent to my group. I have varying string lengths for columns [1] and [12]. Data in [13] is a single digit.
Column 1, selected Olympic Sports, currently has content lengths varying from 9 to 23 characters.
It would be fine to make this field 25 characters in length.
Column 2, Predicted Medalist Countries, has possible variation from 4 to 27 characters.
I can make it work with, say, 10 characters.
Column 3, Points Earned, will be a single digit (5,3,1,0), awarded if the predicted country earns a medal.
For Columns 1 and 2, should string lengths be standardized before launching the Send GmailApp.sendEmail(respDataPicks[25][12], subject, strBody);
If so, how?
Or, can Gmail use fields to be populated in order to get organized output. If so, how?
Obviously, I'm floundering and not finding the key to this problem.
Thanks in advance.
Fred
// Send to FS...Fred
msgGreeting = ("Hello FS..Fred " + "\n" + "\n");
for ( iRow = 7; iRow <= 22; iRow++) {
detailLine = (respDataPicks[iRow][1] + " " + respDataPicks[iRow][12] + " " + respDataPicks[iRow] [13] +"\n" );
msgDetail = msgDetail+ detailLine;
}
Logger.log (msgDetail );
strBody = strBody.concat(msgGreeting,msgIntro, msgDetail);
GmailApp.sendEmail(respDataPicks[25][12], subject, strBody);
}