Skip to content

Commit 78f467f

Browse files
committed
chore(*): fix excel exporters tests
1 parent aef424d commit 78f467f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

projects/igniteui-angular/src/lib/services/excel/test-data.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ export class FileContentData {
615615
case null:
616616
case 0:
617617
wsDataColSettings =
618-
`<cols><col min="1" max="1" width="8.34" customWidth="1"/></cols>`;
618+
`<cols><col min="1" max="1" width="227.85" customWidth="1"/></cols>`;
619619
break;
620620
}
621621

projects/igniteui-angular/src/lib/services/exporter-common/base-export-service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ export interface IColumnExportingEventArgs extends IBaseEventArgs {
6666
skipFormatter: boolean;
6767
}
6868

69+
const DEFAULT_COLUMN_WIDTH = 8.43;
70+
6971
export abstract class IgxBaseExporter {
7072
private _columnList: any[];
7173
private flatRecords = [];
@@ -171,6 +173,7 @@ export abstract class IgxBaseExporter {
171173
if (!this._columnList || this._columnList.length === 0) {
172174
const keys = ExportUtilities.getKeysFromData(data);
173175
this._columnList = keys.map((k) => ({ header: k, field: k, skip: false }));
176+
this._columnWidthList = new Array<number>(keys.length).fill(DEFAULT_COLUMN_WIDTH);
174177
}
175178

176179
let skippedPinnedColumnsCount = 0;

0 commit comments

Comments
 (0)