I am aware of the documentation and I am referring to this when crating a test app. I created a spreadsheet with 3 columns and 5 rows and I add 3 TextBoxes, TextBox1, TextBox2 and TextBox3 and add a button Add.
I have no problem with editing and saving for all t he 5 rows, however when I wanted to add the six rows, I got the following error message.
TypeError: undefined is not an object (evaluating ‘spreadsheet[nrow] = TextBox1.value’).
line 116 column 23
This is the function for adding the row: here nrow = 5
spreadsheet[nrow] = TextBox1.value
spreadsheet[nrow] = TextBox2.value
spreadsheet[nrow] = TextBox3.value
GoogleDrive.saveSpreadsheet(spreadsheet, FILE_ID, saveSpreadsheetCallback)
Any suggestion what went wrong?