@obliczeniowo/elementary
Version:
Library made in Angular version 20
21 lines (18 loc) • 747 B
TypeScript
import * as XLSX from 'xlsx';
/** extended properties for xlsx file */
interface Properties extends XLSX.Properties {
/** max rows number (minimum is 10, maximum is 1048576) */
maxRows?: number;
/** if you want to add header */
headers?: string[];
}
/**
* Save array to xlsx file
* @param arr array to export
* @param name file name
* @param sheet base excel sheet name (will create multiple of sheet's if maxRow is less then number of array rows)
* @param properties XLSX properties and maxRows, headers properties
*/
declare function arrayToXlsx(arr: Array<Array<number | string>>, name: string, sheet: string, properties?: Properties, bookType?: XLSX.BookType): void;
export { arrayToXlsx };
export type { Properties };