View | Details | Raw Unified | Return to bug 56958
Collapse All | Expand All

(-)src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java (-2 / +2 lines)
Lines 305-312 Link Here
305
                if(cell.isPartOfArrayFormulaGroup()){
305
                if(cell.isPartOfArrayFormulaGroup()){
306
                    CellRangeAddress arrayRange = cell.getArrayFormulaRange();
306
                    CellRangeAddress arrayRange = cell.getArrayFormulaRange();
307
                    if (arrayRange.getNumberOfCells() > 1 &&
307
                    if (arrayRange.getNumberOfCells() > 1 &&
308
                            ( arrayRange.isInRange(region.getFirstRow(), region.getFirstColumn()) ||
308
                            ( arrayRange.isInRange(firstRow, firstColumn) ||
309
                              arrayRange.isInRange(region.getFirstRow(), region.getFirstColumn()))  ){
309
                              arrayRange.isInRange(lastRow, lastColumn))  ){
310
                        String msg = "The range " + region.formatAsString() + " intersects with a multi-cell array formula. " +
310
                        String msg = "The range " + region.formatAsString() + " intersects with a multi-cell array formula. " +
311
                                "You cannot merge cells of an array.";
311
                                "You cannot merge cells of an array.";
312
                        throw new IllegalStateException(msg);
312
                        throw new IllegalStateException(msg);

Return to bug 56958