Java Code Examples for org.apache.poi.ss.usermodel.Workbook#SHEET_STATE_HIDDEN
The following examples show how to use
org.apache.poi.ss.usermodel.Workbook#SHEET_STATE_HIDDEN .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HSSFWorkbook.java From lams with GNU General Public License v2.0 | 6 votes |
@Removal(version="3.18") @Deprecated @Override public void setSheetHidden(int sheetIx, int hidden) { switch (hidden) { case Workbook.SHEET_STATE_VISIBLE: setSheetVisibility(sheetIx, SheetVisibility.VISIBLE); break; case Workbook.SHEET_STATE_HIDDEN: setSheetVisibility(sheetIx, SheetVisibility.HIDDEN); break; case Workbook.SHEET_STATE_VERY_HIDDEN: setSheetVisibility(sheetIx, SheetVisibility.VERY_HIDDEN); break; default: throw new IllegalArgumentException("Invalid sheet state : " + hidden + "\n" + "Sheet state must beone of the Workbook.SHEET_STATE_* constants"); } }
Example 2
Source File: WorkbookUtil.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Validates sheet state * * @param state the state to validate * @throws IllegalArgumentException if state is not one of * {@link Workbook#SHEET_STATE_VISIBLE}, * {@link Workbook#SHEET_STATE_HIDDEN} or * {@link Workbook#SHEET_STATE_VERY_HIDDEN} * @deprecated POI 3.16 beta 2. Use {@link org.apache.poi.ss.usermodel.SheetVisibility} instead. */ @Removal(version="3.18") @Deprecated public static void validateSheetState(int state) { switch(state){ case Workbook.SHEET_STATE_VISIBLE: break; case Workbook.SHEET_STATE_HIDDEN: break; case Workbook.SHEET_STATE_VERY_HIDDEN: break; default: throw new IllegalArgumentException("Invalid sheet state : " + state + "\n" + "Sheet state must be one of the Workbook.SHEET_STATE_* constants"); } }