# exceljs-export

> Funcion para exportar data a un excel

Latest version **1.0.6** (published 2021-07-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install exceljs-export
pnpm add exceljs-export
yarn add exceljs-export
bun add exceljs-export
```

## 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.0.6 |
| Published | 2021-07-05 |
| First published | 2021-07-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 40.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | rafadev-it |
| Maintainers | rafadev-it |
| Keywords | export, excel |

## Links

- npm: https://www.npmjs.com/package/exceljs-export
- Repository: https://github.com/RafaDev-IT/export-excelJS
- Homepage: https://github.com/RafaDev-IT/export-excelJS#readme
- Issues: https://github.com/RafaDev-IT/export-excelJS/issues
- npm.io page: https://npm.io/package/exceljs-export

## Dependencies (3)

- [exceljs](https://npm.io/package/exceljs.md) ^4.2.1
- [file-saver](https://npm.io/package/file-saver.md) ^2.0.5
- [typescript](https://npm.io/package/typescript.md) ^4.3.5

## Recent versions

- 1.0.6 (latest) — 2021-07-05
- 1.0.5 — 2021-07-05
- 1.0.4 — 2021-07-05
- 1.0.2 — 2021-07-05
- 1.0.1 — 2021-07-05
- 1.0.0 — 2021-07-04

## README

# Exceljs-export

Exceljs-export is a library to export data to an automatically generated excel with only sending 3 parameters

## Installation

To install, you can use npm

```bash
$ npm install exceljs-export
```

## Usage

```js
//sent data from local
import SaveExcel from 'exceljs-export'
const titlesProps =['n1', 'n2', 'n3'];
const dataProps =[[1,2,3],[4,5,6]];
SaveExcel({ data: dataProps, documentName: 'exportacionExcel', titles:titlesProps });

//sent data from endpoint
import SaveExcel from 'exceljs-export'
import axios from 'axios'

const exportUsers = () => {
    const users = async () => {
      const res = await axios.get('https://jsonplaceholder.typicode.com/todos?_limit=10') 
      return res.data.map(item => Object.values(item))
    }
    users().then(res=>SaveExcel({ data: res, documentName: 'prueba', titles: ['User ID', 'ID', 'Title','Completado'] }))
}

exportUsers();
```
## Examples 
Data exported from endpoint

![sent data from endpoint](https://raw.githubusercontent.com/RafaDev-IT/export-excelJS/master/src/endpoint.PNG) 

Data exported from local

![sent data from local](https://raw.githubusercontent.com/RafaDev-IT/export-excelJS/master/src/local.PNG) 

# Props
Properties required by the library, data type, definition and examples.

| Name| Type | Description | Examples
| --- | --- | --| --|
| titles | Array of number or string | Title of the columns to show in the excel document | ['User ID', 'ID', 'Title','Completado'] |
| data | Array of Arrays of number or string | Data to export to excel document| [[1,2,3],[4,5,6]]|
| documentName| String|  This is the name of the document | 'testDocument'|


## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Created by [Rafael Martinez](https://portafolio-rm.netlify.app)

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