Class RowShifter

java.lang.Object
org.apache.poi.ss.usermodel.helpers.BaseRowColShifter
org.apache.poi.ss.usermodel.helpers.RowShifter
Direct Known Subclasses:
HSSFRowShifter, XSSFRowShifter

public abstract class RowShifter extends BaseRowColShifter
Helper for shifting rows up or down
  • Field Details

    • sheet

      protected final Sheet sheet
  • Constructor Details

    • RowShifter

      public RowShifter(Sheet sh)
  • Method Details

    • shiftMergedRegions

      public List<CellRangeAddress> shiftMergedRegions(int startRow, int endRow, int n)
      Shifts, grows, or shrinks the merged regions due to a row shift. Merged regions that are completely overlaid by shifting will be deleted.
      Specified by:
      shiftMergedRegions in class BaseRowColShifter
      Parameters:
      startRow - the row to start shifting
      endRow - the row to end shifting
      n - the number of rows to shift
      Returns:
      an array of affected merged regions, doesn't contain deleted ones