0
votes

I've got the current code to open a google spreadsheet

var spreadSheet = SpreadsheetApp.openById(docId);

Which works fine for converted google spreadsheets.

But how do I open an unconverted xls file using the google sheets app? (It defaults to using the google drive viewer when I do it like above mentioned)

Thanks

2

2 Answers

1
votes

Going from another post which is asking a similar question I don't think it's currently possible. There's an open issue (issue 1019) requesting the ability to programmatically convert documents.

0
votes

It's possible through Google App Scripts https://code.google.com/p/google-apps-script-issues/issues/detail?id=1019#c15

Strange that Google Drive will allow other apps to be set as default for certain types of files. But won't let you set gsheets or doc itself as default for these file types.

Its kind of odd that a class Product innovator which includes awesome keyboard shortcuts for its products, will let you live with no option but to point checkbox, click on Open with and select its app to open.