I'm facing issue in aligning the data from google sheets when sending it in email body.
So far, its spacing out according to the part numbers. I want "months" and "quantity" in a straight column.
var body = "<body style='white-space:pre-wrap'>";
for (var m=0;m<resultArr.length;m++)
{
body+= "For Part No "+resultArr[m][0].toString()+ "" + "
" +"Month "+resultArr[m][1].toString()+" Quantity is
"+resultArr[m][2].toString()+" <br>";
}
body += "</body>"
I expect the month and column in one straight line
In your case, for example, how about using table? Please think of this as just one of several answers.
body += "<table style=\"border-collapse: separate; border-spacing: 20px 0px;\">"
for (var m=0;m<resultArr.length;m++) {
body+= "<tr><td>For Part No "+resultArr[m][0].toString()+ "</td><td align=\"right\">Month "+resultArr[m][1].toString()+"</td><td align=\"right\">Quantity is "+resultArr[m][2].toString()+"</td></tr>";
}
body += "</table>";
If I misunderstood your question and this was not the direction you want, I apologize.