nodejs EXCEL文件数据转json
2015-09-07 00:00
826 查看
摘要: 在工作中,经常会遇到制作一些静态页面,数据是由运营提供的,为了避免过多的手动操作,可以使用nodejs的xls-to-json去转化。
npm install xls-to-json
var node_xj = require("xls-to-json");
node_xj({
input: "input.xls", // input xls
output: "output.json" // output json
}, function(err, result) {
if(err) {
console.error(err);
} else {
console.log(result);
}
});
npm install xls-to-json
var node_xj = require("xls-to-json");
node_xj({
input: "input.xls", // input xls
output: "output.json" // output json
}, function(err, result) {
if(err) {
console.error(err);
} else {
console.log(result);
}
});
相关文章推荐
- LeetCode_Tree_Populating Next Right Pointers in Each Node I II
- [LeedCode OJ]#24 Swap Nodes in Pairs
- nodejs安装不了和npm安装不了的解决方法
- LeetCode题解:Swap Nodes in Pairs
- node.js的"Cannot enqueue Handshake after invoking quit"错误
- hadoop2.x 如何解决NameNode单节点故障问题?
- Node.js 初窥
- Understanding nodejs
- nodeJS删除文件
- 用nodejs解析json数据
- Swap Nodes in Pairs
- LeetCode -- Delete Node in a Linked List
- org.w3c.dom.Node 转换成xml string
- [leetcode]51 Delete Node in a Linked List
- Node.js开发入门—使用对话框ngDialog
- [LeetCode#24]Swap Nodes in Pairs
- 学习nodejs之hello world
- 学习nodejs之restful
- NodeJS入门(五)—— process对象
- leetcode: (41) Populating Next Right Pointers in Each Node