Package org.apache.poi.ss.formula
Class FormulaShifter
java.lang.Object
org.apache.poi.ss.formula.FormulaShifter
Updates Formulas as rows or sheets are shifted
-
Method Summary
Modifier and TypeMethodDescriptionboolean
adjustFormula
(Ptg[] ptgs, int currentExternSheetIx) static FormulaShifter
createForColumnCopy
(int externSheetIndex, String sheetName, int firstMovedColumnIndex, int lastMovedColumnIndex, int numberOfColumnsToMove, SpreadsheetVersion version) static FormulaShifter
createForColumnShift
(int externSheetIndex, String sheetName, int firstMovedColumnIndex, int lastMovedColumnIndex, int numberOfColumnsToMove, SpreadsheetVersion version) static FormulaShifter
createForRowCopy
(int externSheetIndex, String sheetName, int firstMovedRowIndex, int lastMovedRowIndex, int numberOfRowsToMove, SpreadsheetVersion version) static FormulaShifter
createForRowShift
(int externSheetIndex, String sheetName, int firstMovedRowIndex, int lastMovedRowIndex, int numberOfRowsToMove, SpreadsheetVersion version) static FormulaShifter
createForSheetShift
(int srcSheetIndex, int dstSheetIndex) toString()
-
Method Details
-
createForRowShift
public static FormulaShifter createForRowShift(int externSheetIndex, String sheetName, int firstMovedRowIndex, int lastMovedRowIndex, int numberOfRowsToMove, SpreadsheetVersion version) -
createForRowCopy
public static FormulaShifter createForRowCopy(int externSheetIndex, String sheetName, int firstMovedRowIndex, int lastMovedRowIndex, int numberOfRowsToMove, SpreadsheetVersion version) -
createForColumnShift
public static FormulaShifter createForColumnShift(int externSheetIndex, String sheetName, int firstMovedColumnIndex, int lastMovedColumnIndex, int numberOfColumnsToMove, SpreadsheetVersion version) - Since:
- POI 4.0.0
-
createForColumnCopy
public static FormulaShifter createForColumnCopy(int externSheetIndex, String sheetName, int firstMovedColumnIndex, int lastMovedColumnIndex, int numberOfColumnsToMove, SpreadsheetVersion version) - Since:
- POI 4.0.0
-
createForSheetShift
-
toString
-
adjustFormula
- Parameters:
ptgs
- - if necessary, will get modified by this methodcurrentExternSheetIx
- - the extern sheet index of the sheet that contains the formula being adjusted- Returns:
true
if a change was made to the formula tokens
-