Class ExcelBuilderMultiSheet

  • All Implemented Interfaces:
    IExcelBuilder

    public class ExcelBuilderMultiSheet
    extends ExcelBuilder
    Override the default ExcelBuilder to write over several excel sheet once a cell column exceeds the maximum number of column for excel.
    • Field Detail

      • multiSheetMode

        protected boolean multiSheetMode
    • Constructor Detail

      • ExcelBuilderMultiSheet

        public ExcelBuilderMultiSheet()
    • Method Detail

      • isMultiSheetColumns

        public boolean isMultiSheetColumns()
      • setMultiSheetColumns

        public void setMultiSheetColumns​(boolean multiSheetMode)
        If true, the builder is able to switch on next sheets to fill cells with column id > 255.
      • getOrCreateCell

        public org.apache.poi.ss.usermodel.Cell getOrCreateCell​(int i,
                                                                int j)
        Overrides:
        getOrCreateCell in class ExcelBuilder
      • getVirtualCellSheet

        public int getVirtualCellSheet​(int realColumn)
        Return a sheet ID for the expected cell:
        • sheet 0 for cells [0;255]
        • sheet 1 for cells [256;511]
        • ...
      • getVirtualCellColumn

        public int getVirtualCellColumn​(int realColumn)
        Return a column ID for the expected cell:
        • returns 255 for realColumn=255
        • returns 0 for realColumn=256
        • ...
      • autoSelectSheet

        protected int autoSelectSheet​(int column)
        Compute the sheet/column required to access the given column. If expected sheet is not current, change it. If it does not exist, create it.
        Returns:
        an updated column index.