我尝试使用以下代码将xls文件转换为google电子表格:
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'
})
但我得到了#34;空的回应" Drive.Files.insert行错误...
我做错了什么?
答案 0 :(得分:0)
如何改变?
来自:
Drive.Files.insert(convertedFileinfo, file, {
convert: true,
uploadType:'resumable'
})
收件人:
Drive.Files.insert(convertedFileinfo, file, {
convert: true
})
答案 1 :(得分:0)
我终于使用副本了解它:
var searchFor ="fullText contains 'theFile.xls' and '" + FolderId + "' in parents";
var files = DriveApp.searchFiles(searchFor);
var xlsFile = files.next();
Drive.Files.copy({}, xlsFile.getId(), {convert: true});