npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gupo-xlsx-populate

v1.5.1

Published

A tool for export excle

Readme

gupo-xlsx-populate

基于xlsx-populate进行封装,通过简单的调用方式实现导出Excle文件

安装

yarn

yarn add gupo-xlsx-populate

npm

npm install gupo-xlsx-populate

举个栗子

import ExportExcel from "gupo-xlsx-populate";

ExportExcel({
  dataConfig: {
    rule_id: "规则ID",
    name: "规则名称",
    des: "规则描述",
  },
  dataSource: [
    {
      rule_id: 4045,
      name: "被申请机构名称是否存在验证",
      des: "被申请机构名称是否存在验证",
    },
    {
      rule_id: 4046,
      name: "被申请机构名称是否null验证",
      des: "被申请机构名称是否null验证",
    },
  ],
  stripe: true,
  border: true,
  rowHeight: 30,
  columnWidth: 30,
});

API参考

| 参数名称 | 类型 | 描述 | | ------------------- | ------------ | ---------------------------------------- | | name | String | 导出的表格名称,默认时间戳 | | dataConfig | Object、Array | 数据源配置 | | dataSource | Array | 数据源 | | stripe | Boolean | 是否为斑马纹,默认'false' | | border | Boolean | 是否带有边框,默认'false' | | wrapText | Boolean | 是否换行,默认'false' | | rowHeight | Number | 行高,默认自适应 | | columnWidth | Number | 列宽,默认自适应 | | verticalAlignment | String | 单元格垂直居中,可选值: 'top', 'center', 'bottom', 'justify', 'distributed',默认'center' | | horizontalAlignment | String | 单元格水平居中,可选值: 'left', 'center', 'right', 'fill', 'justify', 'centerContinuous', 'distributed',默认'left' |

dataConfig[Array]

| 参数名称 | 类型 | 描述 | | -------- | -------- | ---------------------------------------- | | label | String | 表头名称 | | prop | String | 数据配置 | | setValue | Function | 数据配置方法 | | ... | ... | 支持传入xlsx-populate所支持的样式显示,参考文档 |