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
(更新所有图表、公式和命名范围中的工作表名称。从 XSSFWorkbook.setSheetName(int, String) 调用这个想法是解析每个公式并将其呈现回具有更新工作表名称的字符串。这是通过解析 Ptgs 来完成的,查找其中包含工作表引用的,然后更改那些)sheetIndex
- the 0-based index of the sheet being changed
(sheetIndex - 正在更改的工作表的从 0 开始的索引)
oldName
- the old sheet name
(oldName - 旧工作表名称)
newName
- the new sheet name
(newName - 新的工作表名称)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.