1

Is it possible to export a Google Spreadsheet in XLS format and save it directly to the user's hard disk using Google Apps Script? I know it is possible to mail the spreadsheet, but the requirement is to save the sheet to the hard disk.

Any workarounds would also be appreciated.

Chris Morgan
  • 86,207
  • 24
  • 208
  • 215
Neel
  • 459
  • 6
  • 18
  • See this [other answer][1] to see how to get an xls version of your spreadsheet. [1]: http://stackoverflow.com/questions/12712137/google-apps-script-to-email-google-spreadsheet-excel-version/12867942#12867942 – Serge insas Jul 14 '13 at 07:53
  • I already know & am successful in sending a excel version of the sheet as an attachment. So that is not the question. The problem is saving directly to the hard disk as xls without opening it as a google-spreadsheet – Neel Jul 14 '13 at 13:54
  • Please note I wrote a comment, not an answer... I did understand your question but just thought it could interest other readers. And also because of the other answer that could let one think the csv format is the only approach. – Serge insas Jul 14 '13 at 14:18
  • Ok...fair enough. But is there any solution that can provide the functionality I want? – Neel Jul 14 '13 at 15:38
  • Not that I know apart from those suggested by Henrique and the Google drive synchronization – Serge insas Jul 14 '13 at 15:44

2 Answers2

1

That is not possible.

A workaround is to have the user install the Google Drive app that syncs files to his computer and on Apps Script, place the file in a folder he's syncing.

Another possibility, after saving on Google Drive your app may show the user a link that they can click and start downloading.

Henrique G. Abreu
  • 17,406
  • 3
  • 56
  • 65
0

If you have Google Drive installed on your PC, it will sync a folder in your hard disc with your Google Drive. You can then save into your Google Drive and it will appear on your PC.

To save in Excel format, it reasonably easy for a single sheet, just save it as a CSV file with an .XLS extension, then when its opened in excel it will be treated as a single worksheet workbook.

Mad G
  • 319
  • 1
  • 5
  • 12
  • See this [other answer][1] to see how to get an xls version of your spreadsheet. [1]: http://stackoverflow.com/questions/12712137/google-apps-script-to-email-google-spreadsheet-excel-version/12867942#12867942 – Serge insas Jul 14 '13 at 07:55