I am creating a google Form backed with a google Spreadsheet. Every day, responses will be added to the Form. Theses responses are added into the Spreadsheet.
The first responses takes the first line in the Spreadsheet, the second response takes the seconds lines and so on.
When I delete the Form responses and I and an other, it continues like if the previous line of the Spreadsheet were filled.
For example, if I had 4 responses, the last one will be on the row 4 of the Spreadsheet. If I clear the response and add an other, it will be added on the 5th row (while the 4 previous row are empty).
Is it a way to reset the "index" for the new responses after I cleared them?
Here is my Google App Script to do so :
var financeSheet = SpreadsheetApp.openById(_spreadsheetId);
var financeForm = FormApp.openById(_formId);
var expencesSheet = financeSheet.getSheetByName(_sheet);
// Clean the form and the responses
financeForm.deleteAllResponses();
expencesSheet.getRange(2, 1, 100, 5).clear();