nodejs导出excel
//导出Excel var nodeExcel = require("excel-export"); var fs = require("fs"); var conf = {}; conf.cols = [{ caption: '姓名', type: "string" }, { caption: '年龄', type: "number" }]; conf.rows = [ ["张三", 25], ["张三", 28], ["李四", 24] ]; var result = nodeExcel.execute(conf); fs.writeFile("aaa.xls", result, 'binary', function (err) { if (err) { console.log(err); } else { console.log("success"); } })