* Display a modal dialog with a single download link. addItem('Download as XLSX', 'downloadXLS_GUI') * e The event parameter for a simple onOpen trigger. The work is done by your browser, based on the single line of HTML containing the ( anchor) tag. Remarkably little code is required to support this. Since you're interested in doing this from the "active spreadsheet", it's logical to extend the UI of your Google Spreadsheet with a custom menu item to serve up a dialog that includes a download link. Instead, we need to leverage the browser. To accomplish this, we can't use server-side Google Apps Script techniques, as the server has no access to your machine's resources. You want a way to trigger an HTTP download of the Google Sheet that uses the system dialog to let you choose where on your PC to save the downloaded file. If you're syncing Google Drive to your PC, then you end up with a copy on your PC as well. The code you posted in your question, as you've noticed, exports an XLS version of the Google Spreadsheet to Google Drive.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |