nodejsはexcelを書きます


1、第三者ライブラリの設置
npm install node-xlsx--save
2、実現コード:
var fs = require('fs');
var xlsx = require('node-xlsx');

var buffer = xlsx.build({worksheets: [
  {"name":"mySheetName", "data":[
    ["A1", "B1"],
    [
      {"value":"A2","formatCode":"General"},
      {"value":"B2","formatCode":"General"}
    ]
  ]}
]});
fs.writeFileSync("./myFile.xlsx, buffer, 'binary')