Package com.itextpdf.pdfoffice
Class SheetSelectorFactory
java.lang.Object
com.itextpdf.pdfoffice.SheetSelectorFactory
Factory class for creating
SheetSelector instances.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SheetSelectorCreatesSheetSelectorinstance with active sheet selected.static SheetSelectorCreatesSheetSelectorinstance with all sheets selected.static SheetSelectorcreateSheetsSelector(Set<String> sheetNames) CreatesSheetSelectorinstance with specified sheet names selected.
-
Method Details
-
createAllSheetsSelector
CreatesSheetSelectorinstance with all sheets selected.Resulting sheet order will be the same as in the original spreadsheet document.
- Returns:
-
new
SheetSelectorinstance, with all sheets selected
-
createActiveSheetSelector
CreatesSheetSelectorinstance with active sheet selected.- Returns:
-
new
SheetSelectorinstance, with active sheet selected
-
createSheetsSelector
CreatesSheetSelectorinstance 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
SheetSelectorinstance, with specified sheet names selected
-