Nodejs比较两个不同的Excel文件,并发现其差异

这是我的第一个问题。 纠正我,如果我错了。 我是nodejs新的蜜蜂。 我想通过nodejs来比较两个excel文件。 我已经使用excel比较模块来比较两个excel文件(确实有多张)。 但它的投掷types错误。 这是我的代码

var excel_compare = require("excel-compare"); excel_compare({ file1: 'data/school.xlsx', // file1 is the main excel to compare with file2: 'data/all.xlsx', // file2 is the file for compare column_file1: { column: [1], join: '' }, column_file2: { column: [2], join: '-' } }) 

当我运行上面的代码时,我得到以下错误

 TypeError: Cannot read property 'value' of undefined at E:\node_modules\npm\node_modules\excel-compare\index.js:17:35 at Array.forEach (native) at Function._.each._.forEach (E:\node_modules\npm\node_modules\excel-compare \node_modules\underscore\underscore.js:79:11) at E:\node_modules\npm\node_modules\excel-compare\index.js:15:5 at Function._.each._.forEach (E:\node_modules\npm\node_modules\excel-compare \node_modules\underscore\underscore.js:82:22) at module.exports (E:\node_modules\npm\node_modules\excel-compare\index.js:1 3:4) at Object.handle (E:\node_modules\npm\Excel\excelread.js:39:2) at next_layer (E:\node_modules\npm\node_modules\express\lib\router\route.js: 103:13) at Route.dispatch (E:\node_modules\npm\node_modules\express\lib\router\route .js:107:5) at E:\node_modules\npm\node_modules\express\lib\router\index.js:213:24 

任何人都可以帮我解决这个问题吗?

看看在excel比较Github页面上的例子,看起来你没有正确指定列。 尝试使用数值。 我不认为你可以比较两个工作表,而不做一些改变的来源。

希望这可以帮助。