Package org.apache.poi.xssf.binary
Class XSSFBSharedStringsTable
java.lang.Object
org.apache.poi.xssf.binary.XSSFBSharedStringsTable
- All Implemented Interfaces:
SharedStrings
- Since:
- 3.16-beta3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getCount()
Return an integer representing the total count of strings in the workbook.getEntryAt
(int idx) Deprecated.getItemAt
(int idx) Return a string item by indexgetItems()
Deprecated.usegetItemAt
insteadint
Returns an integer representing the total count of unique strings in the Shared String Table.
-
Constructor Details
-
XSSFBSharedStringsTable
- Parameters:
pkg
- TheOPCPackage
to use as basis for the shared-strings table.- Throws:
IOException
- If reading the data from the package fails.SAXException
- if parsing the XML data fails.
-
-
Method Details
-
getItems
Deprecated.usegetItemAt
insteadReturn all the strings. Formatting is ignored.- Returns:
- a list with all the shared strings.
-
getEntryAt
Deprecated.usegetItemAt
insteadReturn the string at a given index. Formatting is ignored.- Parameters:
idx
- index of item to return.- Returns:
- the item at the specified position in this Shared String table.
-
getItemAt
Description copied from interface:SharedStrings
Return a string item by index- Specified by:
getItemAt
in interfaceSharedStrings
- Parameters:
idx
- index of item to return.- Returns:
- the item at the specified position in this Shared String table.
-
getCount
public int getCount()Return an integer representing the total count of strings in the workbook. This count does not include any numbers, it counts only the total of text strings in the workbook.- Specified by:
getCount
in interfaceSharedStrings
- Returns:
- the total count of strings in the workbook
-
getUniqueCount
public int getUniqueCount()Returns an integer representing the total count of unique strings in the Shared String Table. A string is unique even if it is a copy of another string, but has different formatting applied at the character level.- Specified by:
getUniqueCount
in interfaceSharedStrings
- Returns:
- the total count of unique strings in the workbook
-
getItemAt
instead