Package org.apache.poi.xssf.binary
Class XSSFBSharedStringsTable
- java.lang.Object
-
- org.apache.poi.xssf.binary.XSSFBSharedStringsTable
-
- All Implemented Interfaces:
SharedStrings
@Internal public class XSSFBSharedStringsTable extends java.lang.Object implements SharedStrings
- Since:
- 3.16-beta3
-
-
Constructor Summary
Constructors Constructor Description XSSFBSharedStringsTable(OPCPackage pkg)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intgetCount()Return an integer representing the total count of strings in the workbook.java.lang.StringgetEntryAt(int idx)Deprecated.usegetItemAtinsteadRichTextStringgetItemAt(int idx)Return a string item by indexjava.util.List<java.lang.String>getItems()Deprecated.usegetItemAtinsteadintgetUniqueCount()Returns an integer representing the total count of unique strings in the Shared String Table.
-
-
-
Constructor Detail
-
XSSFBSharedStringsTable
public XSSFBSharedStringsTable(OPCPackage pkg) throws java.io.IOException, org.xml.sax.SAXException
- Parameters:
pkg- TheOPCPackageto use as basis for the shared-strings table.- Throws:
java.io.IOException- If reading the data from the package fails.org.xml.sax.SAXException- if parsing the XML data fails.
-
-
Method Detail
-
getItems
@Removal(version="4.2") @Deprecated public java.util.List<java.lang.String> getItems()
Deprecated.usegetItemAtinsteadReturn all the strings. Formatting is ignored.- Returns:
- a list with all the shared strings.
-
getEntryAt
@Removal(version="4.2") @Deprecated public java.lang.String getEntryAt(int idx)
Deprecated.usegetItemAtinsteadReturn 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
public RichTextString getItemAt(int idx)
Description copied from interface:SharedStringsReturn a string item by index- Specified by:
getItemAtin 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:
getCountin 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:
getUniqueCountin interfaceSharedStrings- Returns:
- the total count of unique strings in the workbook
-
-