2.0.4 • Published 6 months ago

aoo_to_xlsx v2.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

aoo_to_xlsx

Convert an array of object to xlsx file.

Installing

npm i aoo_to_xlsx

Usage

convertToSheet

Convert array to single sheet excel file

Prototype

convertToSheet($data: Record<string, DefaultDataType>[], options?: ConvertOptions): Promise<void | import("exceljs").Buffer>
import { convertToSheet } from 'aoo_to_xlsx'

convertToSheet([
  { name: "John DOE", age: 45, enabled: true },
  { name: "Jane XIE", age: 45, enabled: false },
], {
  filename: "non_empty_arr",
});

Interfaces

DefaultDataType

type DefaultDataType = string | number | boolean;

ConvertOptions

interface ConvertOptions {
  headers?: Record<string, string>;

  // If it's defined, the function will genera
  filename?: string;
  path?: string;
}
2.0.3

6 months ago

2.0.2

8 months ago

2.0.4

6 months ago

2.0.1

8 months ago

2.0.0

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago