node.js - { [错误 : Command failed: ] killed: false, 代码 : 1, 信号:空 }

标签 node.js excel npm

您好,我在导入 .xlsx 文件时遇到错误,请有人帮忙解决此问题,,

{ [Error: Command failed: ] killed: false, code: 1, signal: null }

var excelParser = require('excel-parser');
        excelParser.worksheets({
          inFile: 'file'
        }, function(err, worksheets){
          if(err) console.error(err);
          console.log(worksheets);
        });

最佳答案

你有Python "xlrd 0.9.3"吗?库安装了吗? 我在一个文件中收到了与您相同的错误。但安装lib后,它变成了更清晰的东西:

    File "/usr/lib/python2.7/zipfile.py", line 763, in _RealGetContents
    raise BadZipfile, "File is not a zip file"
zipfile.BadZipfile: File is not a zip file
] killed: false, code: 1, signal: null }

可能文件已损坏。用 LibreOffice 重新保存后,就可以正常打开了。您也可以尝试将文件扩展名更改为 zip 并解压它,我的会抛出错误。

关于node.js - { [错误 : Command failed: ] killed: false, 代码 : 1, 信号:空 },我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25801096/

相关文章:

node.js - 错误 - 使用 npm 安装 mariasql 包 - node.js

node.js - JSONStream 期间的无限循环

node.js - 使用 NGINX 为 node.js 应用程序在端口 80 上提供 HTTP 流量,用于使用虚拟主机在 Amazon EC2 上托管的域

vba - 通过提供路径参数从 Shell 运行 Excel VBA/宏

Node.js 中的 jquery 制表器

javascript - 如何将文件从 AWS S3 下载到客户端设备?

excel - 将儒略日期(5 或 4 个字符)转换为公历,反之亦然

excel - 将数据从一张表复制到另一张表的最有效的 vba 方法

node.js - npm install - 如何以足够的权限运行构建脚本?

node.js - Npm 包安装失败 - 如何恢复旧的工作版本?