I'm trying to add a break line between array to Google Sheet. I tried <br>
and
but it doesn't work and shows those text between the array in Google Sheet instead. Is there a way to do it? Your response would be very appreciated.
Here's my.gs code:
var ss = SpreadsheetApp.getActiveSpreadsheet();
var ws = ss.getSheetByName("Sheet1");
var data = ws.getRange(5, 1, ws.getLastRow()-1, 9).getValues();
var codeList = data.map(function(r){return r[0].toString(); });
var thingsList = data.map(function(r){return r[8]; });
var position = codeList.indexOf(formObject.codeInput);
var array = [thingsList[position], formObject.things].join('<br>').toString();
if (position > -1) {
position += 5;
ws.getRange(position,9).setValue(array);
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.