Put simply, I am working in Google Apps script, and I have an array value. I want to insert the array value into a sheet cell and the end result being the cell is set to plain text.
Everything about my code works, but this line refuses to result in a plain text output:
function minimal()
{
const allFormResponses = fetchFormResponses(); //loads numbers from form output into a 2D array
var sheet = SpreadsheetApp.getActive().getSheetByName("All");
var lastRow = sheet.getLastRow()+1;
for(var d = 0; d < allFormResponses.length; d++)
{
var lastRow = sheet.getLastRow()+1;
for (var e = 0, col = 1; e < allFormResponses[d].length; e++, col++)
{
sheet.getRange(lastRow,col).setValue(JSON.stringify(allFormResponses[d][e].itemResponse.toString())).setNumberFormat("@");
}
}
}
I have also tried just formatting the entire column after each value is added and that doesn't work either.
Feeling stumped and I feel like it's probably something dumb I am missing.