def get_formula_string(string)       #:nodoc:
    ruby_19 { string = convert_to_ascii_if_ascii(string) }

    record    = 0x0207         # Record identifier
    length    = 0x00           # Bytes to follow
    # string                   # Formula string.
    strlen    = string.bytesize  # Length of the formula string (chars).
    encoding  = 0              # String encoding.

    # Handle utf8 strings.
    if is_utf8?(string)
      string = utf8_to_16be(string)
      encoding = 1
    end

    length    = 0x03 + string.bytesize  # Length of the record data

    header    = [record, length].pack("vv")
    data      = [strlen, encoding].pack("vC")

    header + data + string
  end
def get_formula_string(string)       #:nodoc:
    ruby_19 { string = convert_to_ascii_if_ascii(string) }

    record    = 0x0207         # Record identifier
    length    = 0x00           # Bytes to follow
    # string                   # Formula string.
    strlen    = string.bytesize  # Length of the formula string (chars).
    encoding  = 0              # String encoding.

    # Handle utf8 strings.
    if is_utf8?(string)
      string = utf8_to_16be(string)
      encoding = 1
    end

    length    = 0x03 + string.bytesize  # Length of the record data

    header    = [record, length].pack("vv")
    data      = [strlen, encoding].pack("vC")

    header + data + string
  end
Pack the string value when a formula evaluates to a string. The value cannot
 be calculated by the module and thus must be supplied by the user.