To use this script in Google Drive:
- In your spreadsheet, click Tools->Script Editor.
- Paste the contents of Code.gs into the editor.
- Save.
- Select "Allow" when Google asks about permissions.
- Reload your spreadsheet.
You should now see a new file menu option, "Export".
In my case the pdf is not generated only spreadsheet is generated and the file name is temp_convert_to_pdf
What went wrong?
Sorry, there was a data validation error in my sheet.
It is resolved and now its working
Thanks a lot!