Package org.apache.poi.ss.formula
Class SheetNameFormatter
java.lang.Object
org.apache.poi.ss.formula.SheetNameFormatter
Formats sheet names for use in formula expressions.
- Author:
- Josh Micich
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
appendFormat
(StringBuffer out, String rawSheetName) Deprecated.static void
appendFormat
(StringBuffer out, String workbookName, String rawSheetName) Deprecated.useappendFormat(StringBuilder out, String workbookName, String rawSheetName)
insteadstatic void
appendFormat
(StringBuilder out, String rawSheetName) Convenience method for (format(String)
) when a StringBuilder is already available.static void
appendFormat
(StringBuilder out, String workbookName, String rawSheetName) static String
Used to format sheet names as they would appear in cell formula expressions.
-
Method Details
-
format
Used to format sheet names as they would appear in cell formula expressions.- Returns:
- the sheet name unchanged if there is no need for delimiting. Otherwise the sheet name is enclosed in single quotes ('). Any single quotes which were already present in the sheet name will be converted to double single quotes ('').
-
appendFormat
Deprecated.useappendFormat(StringBuilder out, String rawSheetName)
insteadConvenience method for (format(String)
) when a StringBuffer is already available.- Parameters:
out
- - sheet name will be appended here possibly with delimiting quotesrawSheetName
- - sheet name
-
appendFormat
@Deprecated public static void appendFormat(StringBuffer out, String workbookName, String rawSheetName) Deprecated.useappendFormat(StringBuilder out, String workbookName, String rawSheetName)
instead -
appendFormat
Convenience method for (format(String)
) when a StringBuilder is already available.- Parameters:
out
- - sheet name will be appended here possibly with delimiting quotesrawSheetName
- - sheet name
-
appendFormat
-
appendFormat(StringBuilder out, String rawSheetName)
instead