testExcel(data) {
let userinfo = this.getuserName();
const workbook = new ExcelJS.Workbook();
// 创建带有红色标签颜色的工作表
// const sheet = workbook.addWorksheet("My Sheet", {
// properties: { tabColor: { argb: "FFC0000" } },
// });
// 创建一个第一行和列冻结的工作表
const sheet = workbook.addWorksheet("My Sheet");
sheet.properties.defaultColWidth = 30;
// 在表格底部追加新行
let wopts = {
bookType: "xlsx", bookSST: false, type: "binary" };
let row = 1;
sheet.getRow(row).values = ["操作用户:", userinfo];
row += 1;
let before
exceljs代码
最新推荐文章于 2024-07-14 22:15:03 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)