Class XSSFRichTextStringHelper


  • public class XSSFRichTextStringHelper
    extends Object
    A helper to access XSSFRichTextString's APIs.
    Author:
    jumperchen
    • Constructor Detail

      • XSSFRichTextStringHelper

        public XSSFRichTextStringHelper()
    • Method Detail

      • addRun

        public static void addRun​(org.apache.poi.xssf.usermodel.XSSFRichTextString richTextString,
                                  String text,
                                  org.apache.poi.xssf.usermodel.XSSFFont font)
      • utfEncode

        public static String utfEncode​(String value)
        For all characters which cannot be represented in XML as defined by the XML 1.0 specification, the characters are escaped using the Unicode numerical character representation escape character format _xHHHH_, where H represents a hexadecimal character in the character's value.

        Example: The Unicode character 0D is invalid in an XML 1.0 document, so it shall be escaped as _x000D_.

        See section 3.18.9 in the OOXML spec.
        Parameters:
        value - the string to encode
        Returns:
        the encoded string
        Since:
        3.9.10