public final class XSSFFormulaUtils
extends java.lang.Object
Constructor and Description |
---|
XSSFFormulaUtils(XSSFWorkbook wb) |
Modifier and Type | Method and Description |
---|---|
void |
updateSheetName(int sheetIndex,
java.lang.String oldName,
java.lang.String newName)
Update sheet name in all charts, formulas and named ranges.
|
public XSSFFormulaUtils(XSSFWorkbook wb)
public void updateSheetName(int sheetIndex, java.lang.String oldName, java.lang.String newName)
XSSFWorkbook.setSheetName(int, String)
The idea is to parse every formula and render it back to string with the updated sheet name. This is done by parsing into Ptgs, looking for ones with sheet references in them, and changing those
sheetIndex
- the 0-based index of the sheet being changedoldName
- the old sheet namenewName
- the new sheet nameCopyright 2021 The Apache Software Foundation or its licensors, as applicable.