Skip to content

Commit a061ff8

Browse files
committed
fix(excel-export): fix grouped grid with summaries export
1 parent 22d0229 commit a061ff8

File tree

4 files changed

+31
-30
lines changed

4 files changed

+31
-30
lines changed

projects/igniteui-angular/src/lib/services/excel/excel-files.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ export class WorksheetFile implements IExcelFile {
406406
this.setSummaryCoordinates(columnName, key, fullRow.hierarchicalOwner, worksheetData.isGroupedGrid && isSummaryRecord)
407407
}
408408

409-
if (fullRow.summaryKey && fullRow.summaryKey === GRID_ROOT_SUMMARY && key !== GRID_LEVEL_COL && !this.isValidGrid) {
409+
if (fullRow.summaryKey && fullRow.summaryKey === GRID_ROOT_SUMMARY && key !== GRID_LEVEL_COL && worksheetData.isGroupedGrid) {
410410
this.setRootSummaryStartCoordinate(column, key);
411411

412412
if (this.firstColumn > column) {
@@ -583,9 +583,10 @@ export class WorksheetFile implements IExcelFile {
583583

584584
private setRootSummaryStartCoordinate(column: number, key: string) {
585585
const firstDataRecordColName = ExcelStrings.getExcelColumn(column) + (this.firstDataRow);
586+
const targetMap = this.hierarchicalDimensionMap.get(GRID_PARENT);
586587

587-
if (this.dimensionMap.get(key).startCoordinate !== firstDataRecordColName) {
588-
this.dimensionMap.get(key).startCoordinate = firstDataRecordColName;
588+
if (targetMap.get(key).startCoordinate !== firstDataRecordColName) {
589+
targetMap.get(key).startCoordinate = firstDataRecordColName;
589590
}
590591
}
591592

0 commit comments

Comments
 (0)