https://gist.github.com/mhawksey/1276293
I am trying to understand this post, and specifically how to change var ss = SpreadsheetApp.openById("your_sheet_ID"); I am not sure what they are referring to as the sheet_ID, where would I find that id? In addition, I am not sure what the comments in the code mean when it says "Insert column names on your destination sheet matching the parameter names of the data you are passing in (exactly matching case)" because I am looking at line
var headRow = e.parameter.header_row || 1; and it is not being used anywhere else in the code? I would have thought that would be using headRow in some way, but it appears it is not working that way. Instead it looks like
row.push(e.parameter[headers[i]]); Is taking every passed in parameter and using row to then apply data to the sheet, is this correct? This would make sense, because when I test the web app from latest code it gives me back this:
{"result":"error","error":{"message":"Bad value","name":"Exception","fileName":"script","lineNumber":49,"stack":"\tat script:49 (handleResponse)\n\tat script:32 (doGet)\n"}} Which I assume is because that button does not pass any parameters. So there is an error.
I am trying to figure out if I can post a form from a custom website into a google sheet to save my .org company some money and just update a spreadsheet directly from a form. That way we can save on database space and they can track new sign ups. Let me know your thoughts, and if writing new items to the sheet is the way to go.