String sheetName = _workbook.getSheetName(sheetIndex);
short externSheetIndex = _book.checkExternSheet(sheetIndex);
FormulaShifter shifter = FormulaShifter.createForRowShift(
- externSheetIndex, sheetName, startRow, endRow, n);
+ externSheetIndex, sheetName, startRow, endRow, n, SpreadsheetVersion.EXCEL97);
_sheet.updateFormulasAfterCellShift(shifter, externSheetIndex);
int nSheets = _workbook.getNumberOfSheets();
int sheetIndex = getWorkbook().getSheetIndex(this);
String sheetName = getWorkbook().getSheetName(sheetIndex);
FormulaShifter shifter = FormulaShifter.createForRowShift(
- sheetIndex, sheetName, startRow, endRow, n);
+ sheetIndex, sheetName, startRow, endRow, n, SpreadsheetVersion.EXCEL2007);
rowShifter.updateNamedRanges(shifter);
rowShifter.updateFormulas(shifter);
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.usermodel.RecordInspector.RecordCollector;
+import org.apache.poi.ss.SpreadsheetVersion;
import org.apache.poi.ss.formula.FormulaShifter;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.util.HexRead;
List<RecordBase> sheetRecs = sheet.getRecords();
assertEquals(23, sheetRecs.size());
- FormulaShifter shifter = FormulaShifter.createForRowShift(0, "", 0, 0, 1);
+ FormulaShifter shifter = FormulaShifter.createForRowShift(0, "", 0, 0, 1, SpreadsheetVersion.EXCEL97);
sheet.updateFormulasAfterCellShift(shifter, 0);
if (sheetRecs.size() == 24 && sheetRecs.get(22) instanceof ConditionalFormattingTable) {
throw new AssertionFailedError("Identified bug 46547a");