We have a Google Form that saves its submits to a Google Spreadsheet.
Using the Script manager, how do we export that spreadsheet contents or the latest form submit message to a local Excel spreadsheet or tab-delimited text file on my harddrive?
This would be a 2 step process:
- catch form submit or spreadsheet change event and externalize the data into the cloud Drive.
- place that data on my local hard drive.
How do we do #1 and/or #2, using the Google spreadsheet script?
We have created a OnFormSubmit callback function on the spreadsheet, but we can only log the event message (the form submitted data) to a popup window in Drive.
function OnFormSubmit(e) {
var sheet = SpreadsheetApp.getActiveSheet();
var row = SpreadsheetApp.getActiveSheet().getLastRow();
var newMessage = e;
Logger.log(newMessage);
}
There is a CreateFile method, but its not clear how I could use that.