diff --git a/core/modules/core/src/com/haulmont/yarg/formatters/impl/XlsxFormatter.java b/core/modules/core/src/com/haulmont/yarg/formatters/impl/XlsxFormatter.java index 39e899b..5828b02 100644 --- a/core/modules/core/src/com/haulmont/yarg/formatters/impl/XlsxFormatter.java +++ b/core/modules/core/src/com/haulmont/yarg/formatters/impl/XlsxFormatter.java @@ -771,7 +771,7 @@ protected List copyCells(BandData band, Range templateRange, List res List templateCells = new ArrayList<>(cellsForOneRowRange.values()); Row templateRow = !templateCells.isEmpty() ? (Row) templateCells.get(0).getParent() : - resultSheet.getSheetData().getRow().get(oneRowRange.getFirstRow() - 1); + resultSheetRows.get((int) (firstRow.getR() + i - 1)); createFakeTemplateCellsForEmptyOnes(oneRowRange, cellsForOneRowRange, templateCells);