Class PivotDataExcelHelper
java.lang.Object
io.jmix.pivottable.component.impl.PivotDataExcelHelper
Helps to convert
PivotDataRow
to list with separated cells and provides methods for merging cells.-
Field Summary
Modifier and TypeFieldDescriptionprotected List<PivotDataSeparatedCell>
protected PivotData
protected List<List<PivotDataSeparatedCell>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
addAboveCell
(PivotDataSeparatedCell aboveCell, int indexRow) protected PivotDataSeparatedCell
convertPivotCellToSeparatedCell
(PivotDataCell pivotDataCell) protected int
createAndAddSeparatedCells
(PivotDataSeparatedCell separatedCell, List<PivotDataSeparatedCell> cellsRow) protected List<PivotDataSeparatedCell>
createRow
(PivotDataRow currentRow, List<PivotDataSeparatedCell> prevRow) List<org.apache.poi.ss.util.CellRangeAddress>
int
int
int
getLastColById
(String id) int
getLastRowById
(String id) int
getRows()
protected void
initRows()
-
Field Details
-
pivotData
-
cellsToMerged
-
cellIdsToMerged
-
rows
-
-
Constructor Details
-
PivotDataExcelHelper
-
-
Method Details
-
initRows
protected void initRows() -
getRows
- Returns:
- pivot table data with separated cells (all merged cells were separated and each separated cell has common value and id)
-
getOriginColumnsNumber
public int getOriginColumnsNumber()- Returns:
- number of exactly excel columns and -1 if there is no columns
-
getCellIdsToMerged
- Returns:
- list with unique cells id which should be merged
-
getFirstRowById
- Parameters:
id
- PivotDataSeparatedCell id that should be merged- Returns:
- first row index of all cells that should be merged by common id
-
getLastRowById
- Parameters:
id
- PivotDataSeparatedCell id that should be merged- Returns:
- last row index of all cells that should be merged by common id
-
getFirstColById
- Parameters:
id
- PivotDataSeparatedCell id that should be merged- Returns:
- first col index of all cells that should be merged by common id
-
getLastColById
- Parameters:
id
- PivotDataSeparatedCell id that should be merged- Returns:
- last col index of all cells that should be merged by common id
-
getCellRangeAddresses
- Returns:
- a collection of cell range addresses that should be merged in the
HSSFSheet
-
createRow
protected List<PivotDataSeparatedCell> createRow(PivotDataRow currentRow, List<PivotDataSeparatedCell> prevRow) -
addAboveCell
-
createAndAddSeparatedCells
protected int createAndAddSeparatedCells(PivotDataSeparatedCell separatedCell, List<PivotDataSeparatedCell> cellsRow) -
convertPivotCellToSeparatedCell
-