您的位置:首页 > Web前端 > Node.js

NodeJS excel转json(xls-to-json的简单使用)

2017-07-17 09:31 309 查看
{
"name": "abc",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"xls-to-json": "*"

}
}

var node_xj = require("xls-to-json");
node_xj({
input: "经纬度.xlsx",  // input xls
output: "output.json" // output json
//sheet: "sheet1",  // specific sheetname
}, function (err, result) {
if (err) {
console.error(err);
} else {
console.log(result);
}
});
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: