0.21.0 • Published 1 year ago

@types/node-xlsx v0.21.0

Weekly downloads
8,604
License
MIT
Repository
-
Last release
1 year ago

Installation

npm install --save @types/node-xlsx

Summary

This package contains type definitions for node-xlsx (https://github.com/mgcrea/node-xlsx#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-xlsx.

index.d.ts

// Type definitions for node-xlsx 0.15
// Project: https://github.com/mgcrea/node-xlsx#readme
// Definitions by: kinuxroot <https://github.com/kinuxroot>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0

/**
 * parsing a xlsx from file/buffer, outputs an object of worksheets
 * @param mixed file path or buffer
 * @param options options is for xlsx
 * @returns worksheets data, like: { name: 'worksheets', data: [[1,2,3],['1', '2','word']] }
 */
export function parse(
    mixed: string | ArrayBuffer,
    options?: {}
): Array<{
    name: string;
    data: unknown[][];
}>;

/**
 * building a xlsx
 * @param worksheets worksheets data, like:{ name: 'worksheets', data: [[1,2,3],['1', '2','word']] }
 * @param options spannig multiple rows A1:A4
 * @returns returns a buffer of worksheets
 */
export function build(
    worksheets: Array<{ name: string; data: any[][]; options?: {} | undefined }>,
    options?: {}
): ArrayBuffer;
declare const _default: {
    parse: typeof parse;
    build: typeof build;
};
export default _default;

Additional Details

  • Last updated: Thu, 23 Dec 2021 23:35:12 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by kinuxroot.