I'm trying to convert a xls file to a google spreadsheet with the following code:
var searchFor ="fullText contains 'theFile.xls' and '" + FolderId + "' in parents";
var files = DriveApp.searchFiles(searchFor);
var file = files.next().getBlob();
var convertedFileinfo = {
title: 'theFile',
parents:[{id: FolderId}]
};
Drive.Files.insert(convertedFileinfo, file, {
convert: true,
uploadType:'resumable'
})
But i'm getting "Empty response" error on Drive.Files.insert line...
What I'm doing wrong?
I finally get it to work using copy:
How about following change?
From :
To :