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页面上的例子,看起来你没有正确指定列。 尝试使用数值。 我不认为你可以比较两个工作表,而不做一些改变的来源。
希望这可以帮助。
- 我怎样才能使这一系列的Java脚本variables变成一个函数?
- 在保持格式nodejs的同时更改xlsl表格中的单元格值
- NODE.JS:致命错误 – JS分配失败 – 处理内存不足,同时parsing大型的Excel文件
- 用NodeparsingXLSX并创buildjson
- 在Excel生成文件崩溃之前,Nodejs V8 GC正在通知
- 将JSON文件转换为nodejs中的CSV文件时出现UTF-8/16编码问题
- 在将数据导出到excel / csv angularjs的同时设置列宽和文字包装属性
- 在Node.js中parsingxls / xlsx / xlsm
- 科学记数法手机号码 – Excel的Javascript