-
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathexcelExportOption.interface.ts
More file actions
67 lines (49 loc) · 3.09 KB
/
excelExportOption.interface.ts
File metadata and controls
67 lines (49 loc) · 3.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import type { ExcelStyleInstruction, Workbook, Worksheet } from '@excel-builder-vanilla/types';
import type { FileType } from '../enums/file.type.js';
export interface ExcelExportOption {
/** Defaults to true, when grid is using Grouping, it will show indentation of the text with collapsed/expanded symbol as well */
addGroupIndentation?: boolean;
/** Defaults to true, when enabled the system will try to find the best possible format to use when exporting */
autoDetectCellFormat?: boolean;
/** When defined, this will override header titles styling, when undefined the default will be a bold style */
columnHeaderStyle?: ExcelStyleInstruction;
/** If set then this will be used as column width for all columns */
customColumnWidth?: number;
/** Defaults to false, which leads to all Formatters of the grid being evaluated on export. You can also override a column by changing the propery on the column itself */
exportWithFormatter?: boolean;
/** filename (without extension) */
filename?: string;
/** file type format, .xls/.xlsx (this will provide the extension) */
format?: Extract<FileType, 'xls' | 'xlsx'>;
/** Defaults to false, should we also include hidden properties in the export? */
includeHidden?: boolean;
/**
* file MIME type could be provided by the user.
* - when undefined it will detect the type depending on its extension unless user defines it.
* - user could also be set to an empty string, which in this case would lead to an empty MIME type:
* - ie Salesforce restricts Excel MIME types, however we can go around this issue by not providing any MIME type
*/
mimeType?: string;
/** The column header title (at A0 in Excel) of the Group by. If nothing is provided it will use "Group By" (which is a translated value of GROUP_BY i18n) */
groupingColumnHeaderTitle?: string;
/** The default text to display in 1st column of the File Export, which will identify that the current row is a Grouping Aggregator */
groupingAggregatorRowText?: string;
/** Symbol use to show that the group title is collapsed (you can use unicode like '⮞' or '\u25B7') */
groupCollapsedSymbol?: string;
/** Symbol use to show that the group title is expanded (you can use unicode like '⮟' or '\u25BD') */
groupExpandedSymbol?: string;
/** Defaults to true, when enabled it will decode any HTML entities (e.g. "<div>John & Jane </div>" => "<div>John & Jane</div>") */
htmlDecode?: boolean;
/** Defaults to false, which leads to Sanitizing all data (striping out any HTML tags) when being evaluated on export. */
sanitizeDataExport?: boolean;
/** Defaults to "Sheet1", Excel Sheet Name */
sheetName?: string;
/**
* If true (default), use the Streaming export API for large .xlsx files.
* If false, always use the legacy export method (non-streaming).
* Useful for debugging, compatibility, or environments where streaming is not desired or supported.
*/
useStreamingExport?: boolean;
/** Add a Custom Excel Header on first row of the Excel Sheet */
customExcelHeader?: (workbook: Workbook, sheet: Worksheet) => void;
}