Class SheetNameFormatter


  • public final class SheetNameFormatter
    extends Object
    Formats sheet names for use in formula expressions.
    • Method Detail

      • format

        public static String format​(String rawSheetName)
        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

        public static void appendFormat​(Appendable out,
                                        String rawSheetName)
        Convenience method for (format(String)) when a StringBuffer is already available.
        Parameters:
        out - - sheet name will be appended here possibly with delimiting quotes
        rawSheetName - - sheet name
      • appendFormat

        public static void appendFormat​(Appendable out,
                                        String workbookName,
                                        String rawSheetName)
        Convenience method for (format(String)) when a StringBuffer is already available.
        Parameters:
        out - - sheet name will be appended here possibly with delimiting quotes
        workbookName - - workbook name
        rawSheetName - - sheet name
      • unformat

        public static String unformat​(String sheetName)