public final class XSSFFormulaUtils extends java.lang.Object
|Modifier and Type||Method and Description|
Update sheet name in all formulas and named ranges.
public XSSFFormulaUtils(XSSFWorkbook wb)
public void updateSheetName(int sheetIndex, java.lang.String name)
The idea is to parse every formula and render it back to string with the updated sheet name. The FormulaParsingWorkbook passed to the formula parser is constructed from the old workbook (sheet name is not yet updated) and the FormulaRenderingWorkbook passed to FormulaRenderer#toFormulaString is a custom implementation that returns the new sheet name.
sheetIndex- the 0-based index of the sheet being changed
name- the new sheet name
Copyright 2013 The Apache Software Foundation or its licensors, as applicable.