public class WorkbookUtil
extends java.lang.Object
| Constructor and Description |
|---|
WorkbookUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
createSafeSheetName(java.lang.String nameProposal)
Creates a valid sheet name, which is conform to the rules.
|
static java.lang.String |
createSafeSheetName(java.lang.String nameProposal,
char replaceChar)
Creates a valid sheet name, which is conform to the rules.
|
static void |
validateSheetName(java.lang.String sheetName)
Validates sheet name.
|
static void |
validateSheetState(int state)
Deprecated.
POI 3.16 beta 2. Use
SheetVisibility instead. |
public static final java.lang.String createSafeSheetName(java.lang.String nameProposal)
Workbook.setSheetName(int, String).
nameProposal - can be any string, will be truncated if necessary,
allowed to be nullpublic static final java.lang.String createSafeSheetName(java.lang.String nameProposal,
char replaceChar)
Workbook.setSheetName(int, String).
nameProposal - can be any string, will be truncated if necessary,
allowed to be nullreplaceChar - the char to replace invalid characters.public static void validateSheetName(java.lang.String sheetName)
The character count MUST be greater than or equal to 1 and less than or equal to 31. The string MUST NOT contain the any of the following characters:
sheetName - the name to validatejava.lang.IllegalArgumentException - if validation fails@Removal(version="3.18") @Deprecated public static void validateSheetState(int state)
SheetVisibility instead.state - the state to validatejava.lang.IllegalArgumentException - if state is not one of
Workbook.SHEET_STATE_VISIBLE,
Workbook.SHEET_STATE_HIDDEN or
Workbook.SHEET_STATE_VERY_HIDDENCopyright 2018 The Apache Software Foundation or its licensors, as applicable.