
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
p-export-excel
Advanced tools
p-export-excel 是一个导出 Excel 的 js 插件,支持丰富的自定义配置选项,能够轻松生成 xlsx 和 csv 格式的数据报表。

npm install p-export-excel --save
import pExportExcel from "p-export-excel";
<script src="https://unpkg.com/p-export-excel@[version]/lib/p-export-excel.umd.js"></script>
// 简约数据表
const option = {
fileName: "示例数据表",
sheets: [
{
rows: [
{
cells: ["Cell 1", "Cell 2", "Cell 3"],
},
{
cells: ["Cell 4", "Cell 5", "Cell 5"],
},
],
},
],
};
// 复杂数据表
const option = {
fileName: "复杂数据表",
rowStyle: "height: 40px;vertical-align: middle;",
cellStyle: "border: 1px solid #eee;width: 100px;text-align: center;",
sheets: [
{
sheetName: "学生名单",
style: "font-size: 16px;font-family: 微软雅黑;",
rows: [
{
style: "font-weight: bold;color: #fff;font-size: 18px;",
cellStyle: "background-color: #29B8DB;border: 1px solid #fff;",
cells: [
{
text: "三年级(1)班全体学生名单",
colspan: 5,
},
],
},
{
style: "font-weight: bold;color: #fff;",
cellStyle: "background-color: #29B8DB;border: 1px solid #fff;",
cells: [
"序号",
"姓名",
"性别",
"年龄",
{
text: "备注",
style: "width: 200px;",
},
],
},
{
cells: ["1", "张三", "男", 12, ""],
},
{
cellStyle: "background-color: #F5F5F5;",
cells: ["2", "李四", "女", 11, ""],
},
{
cells: ["3", "王五", "男", 12, "校长侄子"],
},
{
cellStyle: "background-color: #F5F5F5;",
cells: ["4", "赵六", "女", 11, ""],
},
],
},
],
};
pExportExcel(option)
.then((e) => {
console.log(e);
})
.catch((err) => {
console.log(err);
});
FAQs
p-export-excel
We found that p-export-excel demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.