nodejs导出excel

2019-08-09  本文已影响0人  此昵称已被狗抢占
const XLSX = require('xlsx');

const json = [
  {
    date: '2019/7/1',
    time: '1:00:00',
    value: '10ppm',
  },
];

const ws = XLSX.utils.json_to_sheet(json);

const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, 's1');
XLSX.writeFile(wb, 'data.xlsx');
00e7f3fd9abba5c01e0213f98d39101.png
上一篇下一篇

猜你喜欢

热点阅读