我怎么能读取,写入/附加xls文件在节点js

我必须阅读节点js的xls文件我已经尝试了三种方式,但我面临的问题如下。 请为这种问题提出任何可能的解决scheme。

//first time var office = require('office'); office.parse('test.xls', function(err, data) { console.log(data.sheets); }); //second time require('xls').parse('test.xls', function(err, data) { // xls file parsed into data console.log(data); });*/ //third time var fs = require('fs'); var htmlparser = require("htmlparser"); var office = require('office'); exports.onlyText = function(test) { test.expect(3); var handler = new htmlparser.DefaultHandler(function (error, dom) { test.ok(!error, error); var text = htmlparser.DomUtils.getElementsByTagName("P", dom)[0].children[0].raw; test.strictEqual(text, '213', 'text data'); test.done(); }); office.parse(__dirname + '/test.xls', function(err, data) { test.ok(!err, err); var parser = new htmlparser.Parser(handler); parser.parseComplete(data); }); }; //error in console for all time is //Uncaught Error: Cannot find module '../build/Release/node_expat.node' module.js:338 //Uncaught Error: Cannot find module '../build/Release/node_expat.node' module.js:338 

看起来像一个错误https://github.com/hipchat/hubot-hipchat/issues/46

尝试安装node-expat模块。