Skip to content Skip to sidebar Skip to footer

Update Spreadsheet In Serverside Code Run From Client Html Javascript Not Working

I have an html where user requests add and enters data. The javascript in the body of the html calls the server side. I am unable to connect with the sheet either with saved ID or

Solution 1:

You're getting ssId from the script properties and assigning it to the ssId variable, but then you pass a string ("ssId") to the openById() function, not the value of the variable. Try the following please:

const ssId = PropertiesService.getScriptProperties().getProperty('ssId');
var sheet = SpreadsheetApp.openById(ssId).getSheetByName('Sheet1');

Post a Comment for "Update Spreadsheet In Serverside Code Run From Client Html Javascript Not Working"