1 | import { Sheet2JSONOpts, ParsingOptions, Range, ColInfo, RowInfo, ProtectInfo, AutoFilterInfo, AOA2SheetOpts, WritingOptions } from 'xlsx';
|
2 |
|
3 | declare const parse: <T = any[]>(mixed: unknown, options?: Sheet2JSONOpts & ParsingOptions) => {
|
4 | name: string;
|
5 | data: T[];
|
6 | }[];
|
7 | declare const parseMetadata: (mixed: unknown, options?: ParsingOptions) => {
|
8 | name: string;
|
9 | data: Range | null;
|
10 | }[];
|
11 | type WorkSheetOptions = {
|
12 |
|
13 | "!cols"?: ColInfo[];
|
14 |
|
15 | "!rows"?: RowInfo[];
|
16 |
|
17 | "!merges"?: Range[];
|
18 |
|
19 | "!protect"?: ProtectInfo;
|
20 |
|
21 | "!autofilter"?: AutoFilterInfo;
|
22 | };
|
23 | type WorkSheet<T = unknown> = {
|
24 | name: string;
|
25 | data: T[][];
|
26 | options: WorkSheetOptions;
|
27 | };
|
28 | type BuildOptions = WorkSheetOptions & {
|
29 | parseOptions?: AOA2SheetOpts;
|
30 | writeOptions?: WritingOptions;
|
31 | sheetOptions?: WorkSheetOptions;
|
32 | };
|
33 | declare const build: (worksheets: WorkSheet[], { parseOptions, writeOptions, sheetOptions, ...otherOptions }?: BuildOptions) => Buffer;
|
34 | declare const _default: {
|
35 | parse: <T = any[]>(mixed: unknown, options?: Sheet2JSONOpts & ParsingOptions) => {
|
36 | name: string;
|
37 | data: T[];
|
38 | }[];
|
39 | parseMetadata: (mixed: unknown, options?: ParsingOptions) => {
|
40 | name: string;
|
41 | data: Range | null;
|
42 | }[];
|
43 | build: (worksheets: WorkSheet<unknown>[], { parseOptions, writeOptions, sheetOptions, ...otherOptions }?: BuildOptions) => Buffer;
|
44 | };
|
45 |
|
46 | export { type BuildOptions, type WorkSheet, type WorkSheetOptions, build, _default as default, parse, parseMetadata };
|