I would like to write an apps script to email an excel version of my Google Spreadsheet. I know I can save the spreadsheet as an Excel file. I am not sure if I can use the script to email the excel version out as an attachment. How can this be done?
Share
After an answer on another recent post (Thomas van Latum), I tried the suggested doc api and get an interesting result… here is the test code I used and that is working nicely except the file is in xlsx format, not in xls but this is not necessarily an issue these days :
note : if you don’t rename it, its default name is
Export.xlsx, it might be more usefull to get its ID to use it later…so the last line could be like this instead :
EDIT : to trigger the authorization process, try a small function like this, run it from the script editor