【发布时间】:2014-12-15 12:13:23
【问题描述】:
这是我的第一个问题。如果我错了,请纠正我。我是nodejs新蜜蜂。我正在尝试通过 nodejs 比较两个 excel 文件。我使用 excel-compare 模块来比较两个 excel 文件(确实有多个工作表)。但它的抛出类型错误。这是我的代码
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
谁能帮我解决这个问题?
【问题讨论】:
标签: javascript node.js excel typeerror