From 7ecfb134c1b2c3e790591e2316420072b1c5ee50 Mon Sep 17 00:00:00 2001 From: Ivan Gavrilov Date: Wed, 15 Mar 2023 17:43:59 +0400 Subject: [PATCH] Xlsx-report causes 'Index out of bounds' exception #178 --- .../src/com/haulmont/yarg/formatters/impl/XlsxFormatter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);