• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IgniteUI / igniteui-angular / 13331632524

14 Feb 2025 02:51PM CUT coverage: 22.015% (-69.6%) from 91.622%
13331632524

Pull #15372

github

web-flow
Merge d52d57714 into bcb78ae0a
Pull Request #15372: chore(*): test ci passing

1990 of 15592 branches covered (12.76%)

431 of 964 new or added lines in 18 files covered. (44.71%)

19956 existing lines in 307 files now uncovered.

6452 of 29307 relevant lines covered (22.02%)

249.17 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/projects/igniteui-angular/src/lib/services/excel/excel-exporter-options.ts
1
import { IgxExporterOptionsBase } from '../exporter-common/exporter-options-base';
2

3
/**
4
 * Objects of this class are used to configure the Excel exporting process.
5
 */
6
export class IgxExcelExporterOptions extends IgxExporterOptionsBase {
7
    /**
8
     * Specifies if column pinning should be ignored. If ignoreColumnsOrder is set to true,
9
     * this option will always be considered as set to true.
10
     * ```typescript
11
     * let ignorePinning = this.exportOptions.ignorePinning;
12
     * this.exportOptions.ignorePinning = true;
13
     * ```
14
     *
15
     * @memberof IgxExcelExporterOptions
16
     */
UNCOV
17
    public ignorePinning = false;
×
18

19
    /**
20
     * Specifies whether the exported data should be formatted as Excel table. (True by default)
21
     * ```typescript
22
     * let exportAsTable = this.exportOptions.exportAsTable;
23
     * this.exportOptions.exportAsTable = false;
24
     * ```
25
     *
26
     * @memberof IgxExcelExporterOptions
27
     */
UNCOV
28
    public exportAsTable = true;
×
29

30
    private _columnWidth: number;
31
    private _rowHeight: number;
32
    private _worksheetName: string;
33

34
    constructor(fileName: string) {
UNCOV
35
        super(fileName, '.xlsx');
×
36
    }
37

38
    /**
39
     * Gets the width of the columns in the exported excel file.
40
     * ```typescript
41
     * let width = this.exportOptions.columnWidth;
42
     * ```
43
     *
44
     * @memberof IgxExcelExporterOptions
45
     */
46
    public get columnWidth(): number {
UNCOV
47
        return this._columnWidth;
×
48
    }
49

50
    /**
51
     * Sets the width of the columns in the exported excel file. If left unspecified,
52
     * the width of the column or the default width of the excel columns will be used.
53
     * ```typescript
54
     * this.exportOptions.columnWidth = 55;
55
     * ```
56
     *
57
     * @memberof IgxExcelExporterOptions
58
     */
59
    public set columnWidth(value: number) {
UNCOV
60
        if (value < 0) {
×
UNCOV
61
            throw Error('Invalid value for column width!');
×
62
        }
63

UNCOV
64
        this._columnWidth = value;
×
65
    }
66

67
    /**
68
     * Gets the height of the rows in the exported excel file.
69
     * ```typescript
70
     * let height = this.exportOptions.rowHeight;
71
     * ```
72
     *
73
     * @memberof IgxExcelExporterOptions
74
     */
75
    public get rowHeight(): number {
UNCOV
76
        return this._rowHeight;
×
77
    }
78

79
    /**
80
     * Sets the height of the rows in the exported excel file. If left unspecified or 0,
81
     * the default height of the excel rows will be used.
82
     * ```typescript
83
     * this.exportOptions.rowHeight = 25;
84
     * ```
85
     *
86
     * @memberof IgxExcelExporterOptions
87
     */
88
    public set rowHeight(value: number) {
UNCOV
89
        if (value < 0) {
×
UNCOV
90
            throw Error('Invalid value for row height!');
×
91
        }
92

UNCOV
93
        this._rowHeight = value;
×
94
    }
95

96
    /**
97
     * Gets the name of the worksheet in the exported excel file.
98
     * ```typescript
99
     * let worksheetName = this.exportOptions.worksheetName;
100
     * ```
101
     *
102
     * @memberof IgxExcelExporterOptions
103
     */
104
    public get worksheetName(): string {
UNCOV
105
        if (this._worksheetName === undefined || this._worksheetName === null) {
×
UNCOV
106
            return 'Sheet1';
×
107
        }
108

UNCOV
109
        return this._worksheetName;
×
110
    }
111

112
    /**
113
     * Sets the name of the worksheet in the exported excel file.
114
     * ```typescript
115
     * this.exportOptions.worksheetName = "Worksheet";
116
     * ```
117
     *
118
     * @memberof IgxExcelExporterOptions
119
     */
120
    public set worksheetName(value: string) {
UNCOV
121
        this._worksheetName = value;
×
122
    }
123
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc