@Internal public final class InternalWorkbook extends java.lang.Object
This file contains the low level binary records starting at the workbook's BOF and ending with the workbook's EOF. Use HSSFWorkbook for a high level representation.
The structures of the highlevel API use references to this to perform most of their operations. Its probably unwise to use these low level structures directly unless you really know what you're doing. I recommend you read the Microsoft Excel 97 Developer's Kit (Microsoft Press) and the documentation at http://sc.openoffice.org/excelfileformat.pdf before even attempting to use this.
(工作簿的低级模型实现。为工作簿对象中包含的设置和对象提供创建方法。此文件包含从工作簿的 BOF 开始并以工作簿的 EOF 结束的低级二进制记录。使用 HSSFWorkbook 进行高级表示。高级 API 的结构使用对此的引用来执行大部分操作。除非您真的知道自己在做什么,否则直接使用这些低级结构可能是不明智的。我建议您在尝试使用之前阅读 Microsoft Excel 97 Developer's Kit (Microsoft Press) 和 http://sc.openoffice.org/excelfileformat.pdf 上的文档。)HSSFWorkbook
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OLD_WORKBOOK_DIR_ENTRY_NAME
Name of older (pre-Excel 97) Workbook streams, which aren't supported by HSSFWorkbook, only by
OldExcelExtractor
(旧版(Excel 97 之前)工作簿流的名称,HSSFWorkbook 不支持,只有 OldExcelExtractor 支持)
|
protected SSTRecord |
sst
this contains a reference to the SSTRecord so that new stings can be added to it.
(这包含对 SSTRecord 的引用,以便可以向其中添加新的 stings。)
|
static java.lang.String[] |
WORKBOOK_DIR_ENTRY_NAMES
Normally, the Workbook will be in a POIFS Stream called "Workbook".
(通常,工作簿将位于名为“工作簿”的 POIFS 流中。)
|
Modifier and Type | Method and Description |
---|---|
int |
addBSERecord(EscherBSERecord e) |
NameRecord |
addName(NameRecord name)
adds a name record
(添加姓名记录)
|
int |
addSSTString(UnicodeString string)
Adds a string to the SST table and returns its index (if its a duplicate just returns its index and update the counts) ASSUMES compressed unicode (meaning 8bit)
(向 SST 表添加一个字符串并返回它的索引(如果它的重复只返回它的索引并更新计数)假设压缩的 unicode(意思是 8 位))
|
boolean |
changeExternalReference(java.lang.String oldUrl, java.lang.String newUrl)
Changes an external referenced file to another file.
(将外部参考文件更改为另一个文件。)
|
short |
checkExternSheet(int sheetNumber)
Returns the extern sheet number for specific sheet number.
(返回特定图纸编号的外部图纸编号。)
|
short |
checkExternSheet(int firstSheetNumber, int lastSheetNumber)
Returns the extern sheet number for specific range of sheets.
(返回特定工作表范围的外部工作表编号。)
|
void |
cloneDrawings(InternalSheet sheet)
Check if the cloned sheet has drawings.
(检查克隆的图纸是否有图纸。)
|
NameRecord |
cloneFilter(int filterDbNameIndex, int newSheetIndex) |
NameRecord |
createBuiltInName(byte builtInName, int sheetNumber)
Generates a NameRecord to represent a built-in region
(生成一个 NameRecord 来表示一个内置区域)
|
ExtendedFormatRecord |
createCellXF()
creates a new Cell-type Extended Format Record and adds it to the end of ExtendedFormatRecords collection
(创建一个新的 Cell 类型的扩展格式记录并将其添加到 ExtendedFormatRecords 集合的末尾)
|
void |
createDrawingGroup()
Creates a primary drawing group record.
(创建主图纸组记录。)
|
int |
createFormat(java.lang.String formatString)
Creates a FormatRecord, inserts it, and returns the index code.
(创建 FormatRecord,将其插入并返回索引代码。)
|
NameRecord |
createName()
creates new name
(创建新名称)
|
FontRecord |
createNewFont()
creates a new font record and adds it to the "font table".
(创建一个新的字体记录并将其添加到“字体表”中。)
|
StyleRecord |
createStyleRecord(int xfIndex)
Creates a new StyleRecord, for the given Extended Format index, and adds it onto the end of the records collection
(为给定的扩展格式索引创建一个新的 StyleRecord,并将其添加到记录集合的末尾)
|
static InternalWorkbook |
createWorkbook()
Creates an empty workbook object with three blank sheets and all the empty fields.
(创建一个包含三个空白工作表和所有空字段的空工作簿对象。)
|
static InternalWorkbook |
createWorkbook(java.util.List<Record> recs)
read support for low level API.
(读取对低级 API 的支持。)
|
boolean |
doesContainsSheetName(java.lang.String name, int excludeSheetIdx)
Determines whether a workbook contains the provided sheet name.
(确定工作簿是否包含提供的工作表名称。)
|
DrawingManager2 |
findDrawingGroup()
Finds the primary drawing group, if one already exists
(查找主要绘图组(如果已存在))
|
Record |
findFirstRecordBySid(short sid)
Returns the first occurance of a record matching a particular sid.
(返回匹配特定 sid 的记录的第一次出现。)
|
int |
findFirstRecordLocBySid(short sid)
Returns the index of a record matching a particular sid.
(返回与特定 sid 匹配的记录的索引。)
|
Record |
findNextRecordBySid(short sid, int pos)
Returns the next occurance of a record matching a particular sid.
(返回匹配特定 sid 的记录的下一次出现。)
|
java.lang.String |
findSheetFirstNameFromExternSheet(int externSheetIndex)
Finds the first sheet name by his extern sheet index
(通过外部工作表索引查找第一个工作表名称)
|
java.lang.String |
findSheetLastNameFromExternSheet(int externSheetIndex) |
BackupRecord |
getBackupRecord()
Returns the position of the backup record.
(返回备份记录的位置。)
|
EscherBSERecord |
getBSERecord(int pictureIndex) |
PaletteRecord |
getCustomPalette()
Returns the custom palette in use for this workbook; if a custom palette record does not exist, then it is created.
(返回此工作簿使用的自定义调色板;如果自定义调色板记录不存在,则创建它。)
|
DrawingManager2 |
getDrawingManager() |
ExtendedFormatRecord |
getExFormatAt(int index)
gets the ExtendedFormatRecord at the given 0-based index
(在给定的基于 0 的索引处获取 ExtendedFormatRecord)
|
EvaluationWorkbook.ExternalName |
getExternalName(int externSheetIndex, int externNameIndex) |
EvaluationWorkbook.ExternalSheet |
getExternalSheet(int externSheetIndex) |
int |
getExternalSheetIndex(java.lang.String workbookName, java.lang.String sheetName) |
int |
getExternalSheetIndex(java.lang.String workbookName, java.lang.String firstSheetName, java.lang.String lastSheetName) |
FileSharingRecord |
getFileSharing() |
int |
getFirstSheetIndexFromExternSheetIndex(int externSheetNumber)
Finds the (first) sheet index for a particular external sheet number.
(查找特定外部图纸编号的(第一个)图纸索引。)
|
int |
getFontIndex(FontRecord font)
Retrieves the index of the given font
(检索给定字体的索引)
|
FontRecord |
getFontRecordAt(int idx)
gets the font record at the given index in the font table.
(获取字体表中给定索引处的字体记录。)
|
short |
getFormat(java.lang.String format, boolean createIfNotFound)
Returns a format index that matches the passed in format.
(返回与传入格式匹配的格式索引。)
|
java.util.List<FormatRecord> |
getFormats()
Returns the list of FormatRecords in the workbook.
(返回工作簿中的 FormatRecords 列表。)
|
java.util.List<HyperlinkRecord> |
getHyperlinks() |
int |
getLastSheetIndexFromExternSheetIndex(int externSheetNumber)
Finds the last sheet index for a particular external sheet number, which may be the same as the first (except for multi-sheet references)
(查找特定外部图纸编号的最后一个图纸索引,该编号可能与第一个相同(多图纸参考除外))
|
NameCommentRecord |
getNameCommentRecord(NameRecord nameRecord)
gets the name comment record
(获取姓名评论记录)
|
NameRecord |
getNameRecord(int index)
gets the name record
(获取姓名记录)
|
NameXPtg |
getNameXPtg(java.lang.String name, int sheetRefIndex, UDFFinder udf) |
NameXPtg |
getNameXPtg(java.lang.String name, UDFFinder udf) |
int |
getNumberOfFontRecords()
gets the number of font records
(获取字体记录的数量)
|
int |
getNumExFormats()
get the number of ExtendedFormat records contained in this workbook.
(获取此工作簿中包含的 ExtendedFormat 记录数。)
|
int |
getNumNames()
gets the total number of names
(获取名称的总数)
|
int |
getNumRecords() |
int |
getNumSheets()
returns the number of boundsheet objects contained in this workbook.
(返回此工作簿中包含的装订表对象的数量。)
|
RecalcIdRecord |
getRecalcId()
Get or create RecalcIdRecord
(获取或创建 RecalcIdRecord)
|
java.util.List<Record> |
getRecords() |
int |
getSheetIndex(java.lang.String name)
get the sheet's index
(获取工作表的索引)
|
java.lang.String |
getSheetName(int sheetIndex)
gets the name for a given sheet.
(获取给定工作表的名称。)
|
SheetVisibility |
getSheetVisibility(int sheetnum)
Gets the hidden flag for a given sheet.
(获取给定工作表的隐藏标志。)
|
int |
getSize() |
NameRecord |
getSpecificBuiltinRecord(byte name, int sheetNumber)
Retrieves the Builtin NameRecord that matches the name and index There shouldn't be too many names to make the sequential search too slow
(检索与名称和索引匹配的 Builtin NameRecord 不应该有太多的名称使顺序搜索太慢)
|
UnicodeString |
getSSTString(int str)
given an index into the SST table, this function returns the corresponding String value
(给定 SST 表的索引,此函数返回相应的字符串值)
|
StyleRecord |
getStyleRecord(int xfIndex)
Returns the StyleRecord for the given xfIndex, or null if that ExtendedFormat doesn't have a Style set.
(返回给定 xfIndex 的 StyleRecord,如果 ExtendedFormat 没有 Style 集,则返回 null。)
|
WindowOneRecord |
getWindowOne() |
WorkbookRecordList |
getWorkbookRecordList()
Only for internal calls - code based on this is not supported ...
(仅用于内部调用 - 不支持基于此的代码...)
|
WriteAccessRecord |
getWriteAccess() |
WriteProtectRecord |
getWriteProtect() |
void |
insertSST()
use this function to add a Shared String Table to an existing sheet (say generated by a different java api) without an sst....
(使用此函数将共享字符串表添加到现有工作表(例如由不同的 java api 生成)而没有 sst....)
|
boolean |
isSheetHidden(int sheetnum)
Gets the hidden flag for a given sheet.
(获取给定工作表的隐藏标志。)
|
boolean |
isSheetVeryHidden(int sheetnum)
Gets the very hidden flag for a given sheet.
(获取给定工作表的非常隐藏的标志。)
|
boolean |
isUsing1904DateWindowing()
Whether date windowing is based on 1/2/1904 or 1/1/1900.
(日期窗口是基于 1/2/1904 还是 1/1/1900。)
|
boolean |
isWriteProtected()
is the workbook protected with a password (not encrypted)?
(工作簿是否受密码保护(未加密)?)
|
int |
linkExternalWorkbook(java.lang.String name, Workbook externalWorkbook) |
void |
preSerialize()
Perform any work necessary before the workbook is about to be serialized.
(在工作簿即将被序列化之前执行任何必要的工作。)
|
void |
removeBuiltinRecord(byte name, int sheetIndex)
Removes the specified Builtin NameRecord that matches the name and index
(删除与名称和索引匹配的指定内置 NameRecord)
|
void |
removeExFormatRecord(ExtendedFormatRecord rec)
Removes the given ExtendedFormatRecord record from the file's list.
(从文件列表中删除给定的 ExtendedFormatRecord 记录。)
|
void |
removeExFormatRecord(int index)
Removes ExtendedFormatRecord record with given index from the file's list.
(从文件列表中删除具有给定索引的 ExtendedFormatRecord 记录。)
|
void |
removeFontRecord(FontRecord rec)
Removes the given font record from the file's list.
(从文件列表中删除给定的字体记录。)
|
void |
removeName(int nameIndex)
removes the name
(删除名称)
|
void |
removeSheet(int sheetIndex) |
java.lang.String |
resolveNameXText(int refIndex, int definedNameIndex) |
int |
serialize(int offset, byte[] data)
Serializes all records int the worksheet section into a big byte array.
(将工作表部分中的所有记录序列化为一个大字节数组。)
|
void |
setSheetBof(int sheetIndex, int pos)
Sets the BOF for a given sheet
(设置给定工作表的 BOF)
|
void |
setSheetHidden(int sheetnum, boolean hidden)
Hide or unhide a sheet
(隐藏或取消隐藏工作表)
|
void |
setSheetHidden(int sheetnum, SheetVisibility visibility)
Hide or unhide a sheet.
(隐藏或取消隐藏工作表。)
|
void |
setSheetName(int sheetnum, java.lang.String sheetname)
sets the name for a given sheet.
(设置给定工作表的名称。)
|
void |
setSheetOrder(java.lang.String sheetname, int pos)
sets the order of appearance for a given sheet.
(设置给定工作表的出现顺序。)
|
void |
unwriteProtectWorkbook()
removes the write protect flag
(删除写保护标志)
|
void |
updateNameCommentRecordCache(NameCommentRecord commentRecord)
If a
NameCommentRecord is added or the name it references is renamed, then this will update the lookup cache for it.
(如果添加了 NameCommentRecord 或它引用的名称被重命名,那么这将更新它的查找缓存。)
|
void |
updateNamesAfterCellShift(FormulaShifter shifter)
Updates named ranges due to moving of cells
(由于单元格的移动而更新命名范围)
|
void |
updateStyleRecord(int oldXf, int newXf)
Update the StyleRecord to point to the new given index.
(更新 StyleRecord 以指向新的给定索引。)
|
void |
writeProtectWorkbook(java.lang.String password, java.lang.String username)
protect a workbook with a password (not encypted, just sets writeprotect flags and the password.
(使用密码保护工作簿(未加密,只需设置写保护标志和密码。)
|
public static final java.lang.String[] WORKBOOK_DIR_ENTRY_NAMES
public static final java.lang.String OLD_WORKBOOK_DIR_ENTRY_NAME
OldExcelExtractor
(旧版(Excel 97 之前)工作簿流的名称,HSSFWorkbook 不支持,只有 OldExcelExtractor 支持)
protected SSTRecord sst
public static InternalWorkbook createWorkbook(java.util.List<Record> recs)
recs
- an array of Record objects
(recs - Record 对象数组)
public static InternalWorkbook createWorkbook()
public NameRecord getSpecificBuiltinRecord(byte name, int sheetNumber)
name
- byte representation of the builtin name to match
(name - 要匹配的内置名称的字节表示)
sheetNumber
- 1-based sheet number
(sheetNumber - 从 1 开始的工作表编号)
public void removeBuiltinRecord(byte name, int sheetIndex)
name
- byte representation of the builtin to match
(name - 要匹配的内置函数的字节表示)
sheetIndex
- zero-based sheet reference
(sheetIndex - 从零开始的工作表参考)
public int getNumRecords()
public FontRecord getFontRecordAt(int idx)
idx
- the index to look at (0 or greater but NOT 4)
(idx - 要查看的索引(0 或更大但不是 4))
public int getFontIndex(FontRecord font)
font
- the font
(字体 - 字体)
java.lang.IllegalArgumentException
- if the font index can't be determined
(java.lang.IllegalArgumentException - 如果无法确定字体索引)
public FontRecord createNewFont()
public void removeFontRecord(FontRecord rec)
rec
- the font record
(rec - 字体记录)
public int getNumberOfFontRecords()
public void setSheetBof(int sheetIndex, int pos)
sheetIndex
- the number of the sheet to set the positing of the bof for
(sheetIndex - 设置 bof 定位的工作表编号)
pos
- the actual bof position
(pos - 实际的 bof 位置)
public BackupRecord getBackupRecord()
public void setSheetName(int sheetnum, java.lang.String sheetname)
sheetnum
- the sheet number (0 based)
(sheetnum - 工作表编号(从 0 开始))
sheetname
- the name for the sheet
(sheetname - 工作表的名称)
public boolean doesContainsSheetName(java.lang.String name, int excludeSheetIdx)
name
- the name to test (case insensitive match)
(name - 要测试的名称(不区分大小写匹配))
excludeSheetIdx
- the sheet to exclude from the check or -1 to include all sheets in the check.
(excludeSheetIdx - 要从检查中排除的工作表或 -1 以包括检查中的所有工作表。)
public void setSheetOrder(java.lang.String sheetname, int pos)
sheetname
- the name of the sheet to reorder
(sheetname - 要重新排序的工作表的名称)
pos
- the position that we want to insert the sheet into (0 based)
(pos - 我们要将工作表插入的位置(基于 0))
public java.lang.String getSheetName(int sheetIndex)
sheetIndex
- the sheet number (0 based)
(sheetIndex - 工作表编号(从 0 开始))
public boolean isSheetHidden(int sheetnum)
isSheetVeryHidden(int)
)
(获取给定工作表的隐藏标志。请注意,可以将工作表设置为非常隐藏,这是不同的 (isSheetVeryHidden(int)))
sheetnum
- the sheet number (0 based)
(sheetnum - 工作表编号(从 0 开始))
public boolean isSheetVeryHidden(int sheetnum)
isSheetHidden(int)
)
(获取给定工作表的非常隐藏的标志。这与普通的隐藏标志不同(isSheetHidden(int)))
sheetnum
- the sheet number (0 based)
(sheetnum - 工作表编号(从 0 开始))
public SheetVisibility getSheetVisibility(int sheetnum)
isSheetVeryHidden(int)
)
(获取给定工作表的隐藏标志。请注意,可以将工作表设置为非常隐藏,这是不同的 (isSheetVeryHidden(int)))
sheetnum
- the sheet number (0 based)
(sheetnum - 工作表编号(从 0 开始))
public void setSheetHidden(int sheetnum, boolean hidden)
sheetnum
- The sheet number
(sheetnum - 工作表编号)
hidden
- True to mark the sheet as hidden, false otherwise
(hidden - True 将工作表标记为隐藏,否则为 false)
public void setSheetHidden(int sheetnum, SheetVisibility visibility)
sheetnum
- The sheet number
(sheetnum - 工作表编号)
visibility
- the sheet visibility to set (visible, hidden, very hidden)
(visibility - 要设置的工作表可见性(可见、隐藏、非常隐藏))
public int getSheetIndex(java.lang.String name)
name
- sheet name
(名称 - 工作表名称)
public void removeSheet(int sheetIndex)
sheetIndex
- zero based sheet index
(sheetIndex - 从零开始的工作表索引)
public int getNumSheets()
public int getNumExFormats()
public ExtendedFormatRecord getExFormatAt(int index)
index
- of the Extended format record (0-based)
(index - 扩展格式记录的索引(从 0 开始))
public void removeExFormatRecord(ExtendedFormatRecord rec)
rec
- the ExtendedFormatRecord
(rec - 扩展格式记录)
public void removeExFormatRecord(int index)
index
- of the Extended format record (0-based)
(index - 扩展格式记录的索引(从 0 开始))
public ExtendedFormatRecord createCellXF()
public StyleRecord getStyleRecord(int xfIndex)
xfIndex
- the extended format index
(xfIndex - 扩展格式索引)
null
if it that ExtendedFormat doesn't have a Style set.
(StyleRecord,如果 ExtendedFormat 没有 Style 集,则为 null。)
public void updateStyleRecord(int oldXf, int newXf)
oldXf
- the extended format index that was previously associated with this StyleRecord
(oldXf - 先前与此 StyleRecord 关联的扩展格式索引)
newXf
- the extended format index that is now associated with this StyleRecord
(newXf - 现在与此 StyleRecord 关联的扩展格式索引)
public StyleRecord createStyleRecord(int xfIndex)
xfIndex
- the extended format index
(xfIndex - 扩展格式索引)
public int addSSTString(UnicodeString string)
string
- the string to be added to the SSTRecord
(string - 要添加到 SSTRecord 的字符串)
public UnicodeString getSSTString(int str)
str
- the index into the SST table
(str - SST 表的索引)
public void insertSST()
createExtendedSST()
,
SSTRecord
public int serialize(int offset, byte[] data)
offset
- of the data to be written
(offset - 要写入的数据)
data
- array of bytes to write this to
(data - 要写入的字节数组)
public void preSerialize()
public int getSize()
public int linkExternalWorkbook(java.lang.String name, Workbook externalWorkbook)
public java.lang.String findSheetFirstNameFromExternSheet(int externSheetIndex)
externSheetIndex
- extern sheet index
(externSheetIndex - 外部工作表索引)
public java.lang.String findSheetLastNameFromExternSheet(int externSheetIndex)
public EvaluationWorkbook.ExternalSheet getExternalSheet(int externSheetIndex)
public EvaluationWorkbook.ExternalName getExternalName(int externSheetIndex, int externNameIndex)
public int getFirstSheetIndexFromExternSheetIndex(int externSheetNumber)
externSheetNumber
- The external sheet number to convert
(externSheetNumber - 要转换的外部工作表编号)
public int getLastSheetIndexFromExternSheetIndex(int externSheetNumber)
externSheetNumber
- The external sheet number to convert
(externSheetNumber - 要转换的外部工作表编号)
public short checkExternSheet(int sheetNumber)
sheetNumber
- local sheet number
(sheetNumber - 本地图纸编号)
public short checkExternSheet(int firstSheetNumber, int lastSheetNumber)
firstSheetNumber
- first local sheet number
(firstSheetNumber - 第一个本地工作表编号)
lastSheetNumber
- last local sheet number
(lastSheetNumber - 最后一个本地工作表编号)
public int getExternalSheetIndex(java.lang.String workbookName, java.lang.String sheetName)
public int getExternalSheetIndex(java.lang.String workbookName, java.lang.String firstSheetName, java.lang.String lastSheetName)
public int getNumNames()
public NameRecord getNameRecord(int index)
index
- name index
(index - 名称索引)
public NameCommentRecord getNameCommentRecord(NameRecord nameRecord)
nameRecord
- name record who's comment is required.
(nameRecord - 名称记录谁的评论是必需的。)
null
if there isn't one for the given name.
(名称评论记录,如果没有给定名称,则返回 null。)
public NameRecord createName()
public NameRecord addName(NameRecord name)
name
- the name record to be added
(name - 要添加的名称记录)
public NameRecord createBuiltInName(byte builtInName, int sheetNumber)
builtInName
- the built-in name
(builtInName - 内置名称)
sheetNumber
- the sheet number
(sheetNumber - 工作表编号)
public void removeName(int nameIndex)
nameIndex
- name index
(nameIndex - 名称索引)
public void updateNameCommentRecordCache(NameCommentRecord commentRecord)
NameCommentRecord
is added or the name it references is renamed, then this will update the lookup cache for it.
(如果添加了 NameCommentRecord 或它引用的名称被重命名,那么这将更新它的查找缓存。)
commentRecord
- the comment record
(commentRecord - 评论记录)
public short getFormat(java.lang.String format, boolean createIfNotFound)
format
- the format string
(format - 格式字符串)
createIfNotFound
- creates a new format if format not found
(createIfNotFound - 如果未找到格式,则创建新格式)
public java.util.List<FormatRecord> getFormats()
public int createFormat(java.lang.String formatString)
formatString
- the format string
(formatString - 格式字符串)
FormatRecord
,
Record
public Record findFirstRecordBySid(short sid)
sid
- the sid
(sid - sid)
null
if it wasn't found
(匹配的记录,如果没有找到则为 null)
public int findFirstRecordLocBySid(short sid)
sid
- The sid of the record to match
(sid - 要匹配的记录的 sid)
public Record findNextRecordBySid(short sid, int pos)
sid
- the sid
(sid - sid)
pos
- specifies the n-th matching sid
(pos - 指定第 n 个匹配的 sid)
null
if it wasn't found
(匹配的记录,如果没有找到则为 null)
public java.util.List<HyperlinkRecord> getHyperlinks()
public java.util.List<Record> getRecords()
public boolean isUsing1904DateWindowing()
public PaletteRecord getCustomPalette()
public DrawingManager2 findDrawingGroup()
public void createDrawingGroup()
public WindowOneRecord getWindowOne()
public EscherBSERecord getBSERecord(int pictureIndex)
public int addBSERecord(EscherBSERecord e)
public DrawingManager2 getDrawingManager()
public WriteProtectRecord getWriteProtect()
public WriteAccessRecord getWriteAccess()
public FileSharingRecord getFileSharing()
public boolean isWriteProtected()
true
if the workbook is write protected
(如果工作簿被写保护,则为 true)
public void writeProtectWorkbook(java.lang.String password, java.lang.String username)
password
- the password
(密码 - 密码)
username
- the username
(用户名 - 用户名)
public void unwriteProtectWorkbook()
public java.lang.String resolveNameXText(int refIndex, int definedNameIndex)
refIndex
- Index to REF entry in EXTERNSHEET record in the Link Table
(refIndex - 链接表中 EXTERNSHEET 记录中 REF 条目的索引)
definedNameIndex
- zero-based to DEFINEDNAME or EXTERNALNAME record
(definedNameIndex - 从零开始到 DEFINEDNAME 或 EXTERNALNAME 记录)
public NameXPtg getNameXPtg(java.lang.String name, int sheetRefIndex, UDFFinder udf)
name
- the name of an external function, typically a name of a UDF
(name - 外部函数的名称,通常是 UDF 的名称)
sheetRefIndex
- the sheet ref index, or -1 if not known
(sheetRefIndex - 工作表参考索引,如果未知,则为 -1)
udf
- locator of user-defiend functions to resolve names of VBA and Add-In functions
(udf - 用户定义函数的定位器,用于解析 VBA 和加载项函数的名称)
public void cloneDrawings(InternalSheet sheet)
sheet
- the cloned sheet
(sheet - 克隆的工作表)
public NameRecord cloneFilter(int filterDbNameIndex, int newSheetIndex)
public void updateNamesAfterCellShift(FormulaShifter shifter)
shifter
- the formula shifter
(shifter - 公式转换器)
public RecalcIdRecord getRecalcId()
HSSFWorkbook.setForceFormulaRecalculation(boolean)
public boolean changeExternalReference(java.lang.String oldUrl, java.lang.String newUrl)
oldUrl
- The old URL to search for and which is to be replaced
(oldUrl - 要搜索和要替换的旧 URL)
newUrl
- The URL replacement
(newUrl - URL 替换)
@Internal public WorkbookRecordList getWorkbookRecordList()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.