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 🙏

© 2025 – Pkg Stats / Ryan Hefner

neo-export-excel

v1.0.4

Published

一个用于 excel 导出的强大函数(支持自定义样式、自定义单元格属性、多sheet,表格合并等)

Readme

neo-export-excel

一个用于 excel 导出的强大函数(支持自定义样式、自定义单元格属性、多sheet,表格合并等)

Installation

You can use this package on the server side as well as the client side.

Node.js:

npm install neo-export-excel

Usage

import neoExportExcel from "neo-export-excel";

API

neoExportExcel({ name: "导出表格的名称", sheets: ObjectArray });

eg1:多sheet

var list1 = [{
				ypsj: "2020-10-10",
				tbbm: "技术科",
				score: "99.12"
			},
			{
				ypsj: "2020-10-11",
				tbbm: "办公室",
				score: "56.4"
			},
		];
		var list2 = [{
				ypsj: "2020-10-10",
				tbbm: "技术科",
				score: "73.567"
			},
			{
				ypsj: "2020-10-11",
				tbbm: "办公室",
				score: "89"
			},
		];
		const tHeader = [{
				key: "ypsj",
				name: "研判时间",
			},
			{
				key: "tbbm",
				name: "填报部门"
			},
			{
				key: "score",
				name: "代码",
				format: "0.00",  //单元格格式 例:"0.00"代表数字保留2位小数,"@"代表文本,"Percent"代表百分比
				style:{"text-align":"right"}  //单元格样式
			},
		];
		var excelInfo = {
			name: "这是表格的名称",
			sheets: [{
					name: "这是sheet1",
					content: list1,
					tHeader: tHeader,
				},
				{
					name: "这是sheet2",
					content: list2,
					tHeader: tHeader,
				},
			],
		};

neoExportExcel(excelInfo);

eg2:表格合并

var content =
			`<thead>
				<tr>
					<th>研判时间</th>
					<th>填报部门</th>
					<th>代码</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>2020-10-22</td>
					<td>技术科</td>
					<td>123</td>
				</tr>
				<tr>
					<td>2020-10-22</td>
					<td rowspan="2">办公室</td>
					<td>123</td>
				</tr>
				<tr>
					<td>2020-10-22</td>
					<td>123</td>
				</tr>
			</tbody>`
		var excelInfo = {
			name: "这是表格的名称",
			sheets: [{
				name: "这是sheet1",
				content: content,
			}],
		};

neoExportExcel(excelInfo);