const xlsxStyle = require("xlsx-style");
const xlsx = require('xlsx');
const wb = xlsx.utils.book_new();
var ws_name = "SheetJS";
/* make worksheet */
var ws_data = [
[ "S", "h", "e", "e\ntest", "tteststesateafwefewffw", "J", "S" ],
[ 1 , 2 , 3 , 4 , 5 ]
];
var ws = xlsx.utils.aoa_to_sheet(ws_data);
// ws['D1'].W = "e\ntest";
// ws['D1'].h = "e\ntest";
console.log('----', ws['D1']
xlsx导出excel, 并且通过 xlsx-style 添加样式
最新推荐文章于 2024-05-28 08:56:11 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)