在谷歌应用脚本中将.xls转换为谷歌电子表格 [英] Converting .xls to google spreadsheet in google apps script
本文介绍了在谷歌应用脚本中将.xls转换为谷歌电子表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个存储在Google云端硬盘中的.xls文件。我想通过Google Apps脚本将其转换为Google表格电子表格文件格式。有没有办法做到这一点,而无需外部解决方案?
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?
推荐答案
现在可以使用高级云端硬盘服务:
This is now possible using the Advanced Drive service:
https://developers.google.com/ apps-script / advanced / drive
使用Drive.Files.insert时,只需将可选参数convert设置为true。
When using Drive.Files.insert, simply set the optional parameter "convert" to "true".
var file = {
title: 'Converted Spreadsheet'
};
file = Drive.Files.insert(file, xlsxBlob, {
convert: true
});
这也是从上面给出的问题
这篇关于在谷歌应用脚本中将.xls转换为谷歌电子表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文