2.0.5 • Published 3 years ago

@numpod/excel-ent v2.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Excel-ent

NPM npm

Description

excel-ent is a helper lib to export data in XLS and CSV.

Installation

$ yarn add @numpod/excel-ent

# or with npm

$ npm install @numpod/excel-ent --save

Using excel-ent

Two main functions exportmeExcel & exportmeToCsv

exportmeExcel

exportmeExcel(data: any[], title: string, options?: CSS.Properties)

Parameters

data Required, must be an array of Object

title Required, name of the archive generated

options Optional, receives two attributes: bodyStyle and headerStyle

  • bodyStyle and headerStyle: Both receives CSS Properties in camelCase and provide style for the header and body in the Excel File

Example

import { exportmeExcel } from "@numpod/excel-ent";

const data = [
  {
    id: 1,
    name: 'Some Name',
    age: 21,
  },
  {
    id: 2,
    name: 'Some New Name',
    age: 23,
  },
  {
    id: 3,
    name: 'Some Name Again',
    age: 22,
  },
];

exportmeExcel(data, 'test', {
  bodyStyle: { fontSize: '20px' },
  headerStyle: { fontSize: '40px' },
});

Example output


exportmeToCsv

exportmeToCsv(data: any[], title: string)

Parameters

data Required, must be an array of Object

title Required, name of the archive generated

Example

import { exportmeToCsv } from "@numpod/excel-ent";

const data = [
  {
    id: 1,
    name: "Some Name",
    age: 21,
  },
  {
    id: 2,
    name: "Some New Name",
    age: 23,
  },
  {
    id: 3,
    name: "Some Name Again",
    age: 22,
  },
];

exportmeToCSV(data, "MyReport");

Last fux

License

@numpod/excel-ent is MIT licensed.


Thank you and be free to contribute.

2.0.2

3 years ago

2.0.5

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago