So I have a google form and I am processing the data from the form using script, and I ultimately want to populate this data into a spreadsheet. I've tested my code and the logger is printing all the data in the form itself, but my google sheet remains empty. I suspect I'm using the wrong code to write to sheets, but I'm not sure. I scoured through the Sheets API and it says that I can write into a sheet using appendRow and that I can choose which sheet to write to using openById(), but these do not seem to work. I would really appreciate any insights!
This is the code I have right now to write into my spreadsheet, which is not working.
var array1 = [id, score]; // these are 2 variables that were initialized previously
array1 = array1.concat(array2);
// array2 is another array that I've initialized previously which works fine
// (I've tested both of these arrays in the Logger and it prints correctly)
var ss=SpreadsheetApp.openById(‘SSID’);
var sheet = ss.getSheetByName("Name");
sheet.appendRow(array1);
Take the speech marks from around SSID, if the constant SSID is defined:
or if you are using the ID directly: