org.apache.poi.xssf.usermodel.helpers
Class XSSFRowShifter

java.lang.Object
  extended by org.apache.poi.ss.usermodel.helpers.RowShifter
      extended by org.apache.poi.xssf.usermodel.helpers.XSSFRowShifter

public final class XSSFRowShifter
extends RowShifter

Helper for shifting rows up or down When possible, code should be implemented in the RowShifter abstract class to avoid duplication with HSSFRowShifter


Field Summary
 
Fields inherited from class org.apache.poi.ss.usermodel.helpers.RowShifter
sheet
 
Constructor Summary
XSSFRowShifter(XSSFSheet sh)
           
 
Method Summary
 java.util.List<CellRangeAddress> shiftMerged(int startRow, int endRow, int n)
          Deprecated. POI 3.15 beta 2. Use RowShifter.shiftMergedRegions(int, int, int) instead.
 void updateConditionalFormatting(FormulaShifter shifter)
           
 void updateFormulas(FormulaShifter shifter)
          Update formulas.
 void updateHyperlinks(FormulaShifter shifter)
          Shift the Hyperlink anchors (not the hyperlink text, even if the hyperlink is of type LINK_DOCUMENT and refers to a cell that was shifted).
 void updateNamedRanges(FormulaShifter shifter)
          Updated named ranges
 void updateRowFormulas(Row row, FormulaShifter shifter)
          Update the formulas in specified row using the formula shifting policy specified by shifter
 
Methods inherited from class org.apache.poi.ss.usermodel.helpers.RowShifter
shiftMergedRegions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSSFRowShifter

public XSSFRowShifter(XSSFSheet sh)
Method Detail

shiftMerged

public java.util.List<CellRangeAddress> shiftMerged(int startRow,
                                                    int endRow,
                                                    int n)
Deprecated. POI 3.15 beta 2. Use RowShifter.shiftMergedRegions(int, int, int) instead.

Shift merged regions

Parameters:
startRow - the row to start shifting
endRow - the row to end shifting
n - the number of rows to shift
Returns:
an array of merged cell regions

updateNamedRanges

public void updateNamedRanges(FormulaShifter shifter)
Updated named ranges

Specified by:
updateNamedRanges in class RowShifter

updateFormulas

public void updateFormulas(FormulaShifter shifter)
Update formulas.

Specified by:
updateFormulas in class RowShifter

updateRowFormulas

@Internal
public void updateRowFormulas(Row row,
                                       FormulaShifter shifter)
Update the formulas in specified row using the formula shifting policy specified by shifter

Specified by:
updateRowFormulas in class RowShifter
Parameters:
row - the row to update the formulas on
shifter - the formula shifting policy

updateConditionalFormatting

public void updateConditionalFormatting(FormulaShifter shifter)
Specified by:
updateConditionalFormatting in class RowShifter

updateHyperlinks

public void updateHyperlinks(FormulaShifter shifter)
Shift the Hyperlink anchors (not the hyperlink text, even if the hyperlink is of type LINK_DOCUMENT and refers to a cell that was shifted). Hyperlinks do not track the content they point to.

Specified by:
updateHyperlinks in class RowShifter
Parameters:
shifter -