Google apps script 应用程序脚本:xls在gmail中附加到谷歌电子表格

Google apps script 应用程序脚本:xls在gmail中附加到谷歌电子表格,google-apps-script,google-sheets,Google Apps Script,Google Sheets,我尝试使用应用程序脚本打开xls。 我可以通过以下方式获取文件的内容类型: var attach = messages[j].getAttachments()[0]; var name = attach.getName(); var type = attach.getContentType(); 我得到: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 但是,我怎样才能读取单元格中的信

我尝试使用应用程序脚本打开xls。
我可以通过以下方式获取文件的内容类型:

    var attach = messages[j].getAttachments()[0];
    var name = attach.getName();
    var type = attach.getContentType();
我得到:

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
但是,我怎样才能读取单元格中的信息呢

编辑 如果我使用

DocsList.createFile(attach);

附加
被添加到谷歌文档列表中。

我用驱动器上传了文件