I have an .xls file stored in Google Drive. I want to convert it to the Google Sheets spreadsheet file format from Google Apps Script. Is there any way to do this without external solutions?
相关问题
- How can I force all files in a folder to be owned
- Google Apps Script: testing doPost() with cURL
- Google Apps Script to turn in, grade, and return a
- Script fails on SpreadsheetApp.openById - Requires
- Split Lines and Bold Text within a ui.alert Window
相关文章
- How to allow access for importrange function via a
- Google app script trigger not working
- Set Date/Time to 00:00:00
- indexOf returning -1 despite object being in the a
- Using MIN() inside ARRAYFORMULA()
- How can my Google Apps Script be run by others the
- Google Spreadsheet COUNTIF formula equivalent with
- In Google Sheets how to reference infinite rows in
Here's the complete code to create a file in a particular folder: (was a hint but was not completely apparent to me from @ben-visness comment)
Note: This will require enabling advanced Drive service from within Google Apps Script - Menu > Resources > Advanced Google Services AND Menu > Resources > Advanced Google Services > Google API Console.
Other than using the delivered 'upload' and convert functions, it's not currently available. Requesting enhancement request here: http://code.google.com/p/google-apps-script-issues/issues/detail?id=1019
This is now possible using the Advanced Drive service:
https://developers.google.com/apps-script/advanced/drive
When using Drive.Files.insert, simply set the optional parameter "convert" to "true".
This was also obtained from the above given issue