Reputation: 136
I have been having trouble with formatting a dialog in Google Apps Script
. I would like to have a dialog using SpreadsheetApp.getUi().alert(prompt)
which has a line break so I can have a list. I tried using \n
, \\n
, and <br />
, but nothing appears to work and I can't find anything anywhere on whether or not it is even possible. Any ideas?
Upvotes: 7
Views: 6237
Reputation: 462
I have implemented this type of messaging inside a Google doc using the following code:
var doc = DocumentApp.openById('your long doc ID');
var body = doc.getBody();
body.appendParagraph("Line 1");
body.appendParagraph("Line 2");
or you could do it in a sheet using:
sheet.appendRow(['line1col1','col2']);
sheet.appendRow(['line2col1','col2']);
Upvotes: 0