# export-to-excel-new

> 前端生成excel插件

Latest version **1.2.3** (published 2024-01-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install export-to-excel-new
pnpm add export-to-excel-new
yarn add export-to-excel-new
bun add export-to-excel-new
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.3 |
| Published | 2024-01-02 |
| First published | 2023-03-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 438 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | 18516073029chen |
| Maintainers | 18516073029chen |
| Keywords | vue-json-excel, Export2Excel, export-to-excel |

## Links

- npm: https://www.npmjs.com/package/export-to-excel-new
- npm.io page: https://npm.io/package/export-to-excel-new

## Dependencies (2)

- [xlsx](https://npm.io/package/xlsx.md) ^0.18.5
- [file-saver](https://npm.io/package/file-saver.md) ^2.0.5

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.2.3 (latest) — 2024-01-02
- 1.1.4 — 2023-07-25
- 1.0.1 — 2023-03-04
- 1.0.0 — 2023-03-03

## README

```
const { export_json_to_excel } = require("export-to-excel-new")
var data = [
  { index: 0, username: "张三", password: 333 },
  { index: 1, username: "李四", password: 444 }
]
const fieldName = [{ prop: "index", value: "索引" }, { prop: "username", value: "用户名" }, { prop: "password", value: "密码" }]
export_json_to_excel(fieldName, data, "用户列表");

```
### 注解
-------

export_json_to_excel参数示意
-------
1. fieldName：表示表格的表头：例如：[{ prop: "index", value: "索引" }, { prop: "username", value: "用户名" }, { prop: "password", value: "密码" }],value为表头值，prop为每一列的标识
2. data：是数据：例如：[
  { index: 0, username: "张三", password: 333 },
  { index: 1, username: "李四", password: 444 }
]
注意数据每一项的对象key要与fieldName数组每一项的prop值对应，便于归整每一列的值
3. 第三个参数为表格名称：xxx

-------
### 可支持es6、common.js

---
_Source: https://npm.io/package/export-to-excel-new · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
