I want to achieve this with Google Apps Script, or the Google Drive API directly.
I know it is possible to create a new XLSX file from a Google Sheet
var url = file.exportLinks[MimeType.MICROSOFT_EXCEL]; // xlsx
but I have an older application that requires a XLS file export. I also know I can convert it using MS Office or various third-party tools but I would like to do it in one step.
Using the older
var url = file.exportLinks['application/vnd.ms-excel'];
url is undefined but not error, so I assume it is simply telling me it is unsupported.
I also tried this directly in the address bar, note the "xls" rather than "xlsx":
https://docs.google.com/spreadsheets/export?exportFormat=xls&id=[MY_FILE_ID]
But it said it can't open that file.