1 |
|
2 |
|
3 |
|
4 | import { ExportParams } from "../exportParams";
|
5 | export interface ExcelWorksheet {
|
6 | name: string;
|
7 | table: ExcelTable;
|
8 | }
|
9 | export interface ExcelTable {
|
10 | columns: ExcelColumn[];
|
11 | rows: ExcelRow[];
|
12 | }
|
13 | export interface ExcelColumn {
|
14 | width: number;
|
15 | }
|
16 | export interface ExcelRow {
|
17 | cells: ExcelCell[];
|
18 | }
|
19 | export interface ExcelCell {
|
20 | styleId: string;
|
21 | data: ExcelData;
|
22 | mergeAcross?: number;
|
23 | }
|
24 | export interface ExcelData {
|
25 | type: ExcelDataType;
|
26 | value: string;
|
27 | }
|
28 | export declare type ExcelDataType = "String" | "Number" | "Boolean" | "DateTime" | "Error";
|
29 | export interface ExcelStyle {
|
30 | id?: string;
|
31 | name?: string;
|
32 | alignment?: ExcelAlignment;
|
33 | borders?: ExcelBorders;
|
34 | font?: ExcelFont;
|
35 | interior?: ExcelInterior;
|
36 | numberFormat?: ExcelNumberFormat;
|
37 | protection?: ExcelProtection;
|
38 | dataType?: string;
|
39 | }
|
40 | export interface ExcelProtection {
|
41 | protected: boolean;
|
42 | hideFormula: boolean;
|
43 | }
|
44 | export interface ExcelNumberFormat {
|
45 | format: string;
|
46 | }
|
47 | export interface ExcelAlignment {
|
48 | vertical: string;
|
49 | indent: number;
|
50 | horizontal: string;
|
51 | readingOrder: string;
|
52 | rotate: number;
|
53 | shrinkToFit: boolean;
|
54 | verticalText: boolean;
|
55 | wrapText: boolean;
|
56 | }
|
57 | export interface ExcelBorders {
|
58 | borderBottom: ExcelBorder;
|
59 | borderLeft: ExcelBorder;
|
60 | borderTop: ExcelBorder;
|
61 | borderRight: ExcelBorder;
|
62 | }
|
63 | export interface ExcelBorder {
|
64 | lineStyle: string;
|
65 | weight: number;
|
66 | color: string;
|
67 | }
|
68 | export interface ExcelFont {
|
69 | bold: boolean;
|
70 | color: string;
|
71 | fontName: string;
|
72 | italic: boolean;
|
73 | outline: boolean;
|
74 | shadow: boolean;
|
75 | size: number;
|
76 | strikeThrough: boolean;
|
77 | underline: string;
|
78 | verticalAlign: string;
|
79 | charSet: number;
|
80 | family: string;
|
81 | }
|
82 | export interface ExcelInterior {
|
83 | color: string;
|
84 | pattern: string;
|
85 | patternColor: string;
|
86 | }
|
87 | export interface ExcelExportParams extends ExportParams<ExcelCell[][]> {
|
88 | sheetName?: string;
|
89 | suppressTextAsCDATA?: boolean;
|
90 | }
|
91 | export interface IExcelCreator {
|
92 | exportDataAsExcel(params?: ExcelExportParams): void;
|
93 | getDataAsExcelXml(params?: ExcelExportParams): string;
|
94 | }
|