public class WorkbookUtil extends Object
Constructor and Description |
---|
WorkbookUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
createSafeSheetName(String nameProposal)
Creates a valid sheet name, which is conform to the rules.
|
static String |
createSafeSheetName(String nameProposal,
char replaceChar)
Creates a valid sheet name, which is conform to the rules.
|
static short |
hashPassword(String password) |
static void |
validateSheetName(String sheetName)
Validates sheet name.
|
static void |
validateSheetState(int state) |
public static final String createSafeSheetName(String nameProposal)
HSSFWorkbook.setSheetName(int, String)
.
nameProposal
- can be any string, will be truncated if necessary,
allowed to be nullpublic static final String createSafeSheetName(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(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 validatepublic static void validateSheetState(int state)
public static short hashPassword(String password)
Copyright © 2020. All rights reserved.