Package com.itextpdf.pdfoffice
Class SheetSelectorFactory
java.lang.Object
com.itextpdf.pdfoffice.SheetSelectorFactory
Factory class for creating
SheetSelector
instances.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SheetSelector
CreatesSheetSelector
instance with active sheet selected.static SheetSelector
CreatesSheetSelector
instance with all sheets selected.static SheetSelector
createSheetsSelector
(Set<String> sheetNames) CreatesSheetSelector
instance with specified sheet names selected.
-
Method Details
-
createAllSheetsSelector
CreatesSheetSelector
instance with all sheets selected.Resulting sheet order will be the same as in the original spreadsheet document.
- Returns:
-
new
SheetSelector
instance, with all sheets selected
-
createActiveSheetSelector
CreatesSheetSelector
instance with active sheet selected.- Returns:
-
new
SheetSelector
instance, with active sheet selected
-
createSheetsSelector
CreatesSheetSelector
instance with specified sheet names selected.Resulting sheet order will be the same as in the original spreadsheet document. All sheet names are case-insensitive, i.e. if there is a "Test" sheet in the spreadsheet, then any of "test", "Test", "TEST" etc. will work for selection.
Duplicate sheets will be printed only once regardless of how much times a sheet name is passed.
- Parameters:
-
sheetNames
- sheet names to select - Returns:
-
new
SheetSelector
instance, with specified sheet names selected
-