Methods summary
public static
boolean
|
#
getIsMbstringEnabled( )
Get whether mbstring extension is available
Get whether mbstring extension is available
Returns
boolean
|
public static
boolean
|
#
getIsIconvEnabled( )
Get whether iconv extension is available
Get whether iconv extension is available
Returns
boolean
|
public static
string
|
#
ControlCharacterOOXML2PHP( string $value = '' )
Convert from OpenXML escaped control character to PHP control character
Convert from OpenXML escaped control character to PHP control character
Excel 2007 team:
That's correct, control characters are stored directly in the shared-strings
table. We do encode characters that cannot be represented in XML using the
following escape sequence: _xHHHH_ where H represents a hexadecimal character in
the character's value... So you could end up with something like _x0008_ in a
string (either in a cell value (<v>) element or in the shared string
<t> element.
Parameters
- $value
string $value Value to unescape
Returns
string
|
public static
string
|
#
ControlCharacterPHP2OOXML( string $value = '' )
Convert from PHP control character to OpenXML escaped control character
Convert from PHP control character to OpenXML escaped control character
Excel 2007 team:
That's correct, control characters are stored directly in the shared-strings
table. We do encode characters that cannot be represented in XML using the
following escape sequence: _xHHHH_ where H represents a hexadecimal character in
the character's value... So you could end up with something like _x0008_ in a
string (either in a cell value (<v>) element or in the shared string
<t> element.
Parameters
- $value
string $value Value to escape
Returns
string
|
public static
boolean
|
#
IsUTF8( string $value = '' )
Check if a string contains UTF-8 data
Check if a string contains UTF-8 data
Parameters
Returns
boolean
|
public static
string
|
#
FormatNumber( mixed $value )
Formats a numeric value as a string for output in various output writers
Formats a numeric value as a string for output in various output writers
Parameters
Returns
string
|
public static
string
|
#
UTF8toBIFF8UnicodeShort( string $value )
Converts a UTF-8 string into BIFF8 Unicode string data (8-bit string length)
Writes the string using uncompressed notation, no rich text, no Asian phonetics
If mbstring extension is not available, ASCII is assumed, and compressed
notation is used although this will give wrong results for non-ASCII strings see
OpenOffice.org's Documentation of the Microsoft Excel File Format, sect.
2.5.3
Converts a UTF-8 string into BIFF8 Unicode string data (8-bit string length)
Writes the string using uncompressed notation, no rich text, no Asian phonetics
If mbstring extension is not available, ASCII is assumed, and compressed
notation is used although this will give wrong results for non-ASCII strings see
OpenOffice.org's Documentation of the Microsoft Excel File Format, sect.
2.5.3
Parameters
- $value
string $value UTF-8 encoded string
Returns
string
|
public static
string
|
#
UTF8toBIFF8UnicodeLong( string $value )
Converts a UTF-8 string into BIFF8 Unicode string data (16-bit string length)
Writes the string using uncompressed notation, no rich text, no Asian phonetics
If mbstring extension is not available, ASCII is assumed, and compressed
notation is used although this will give wrong results for non-ASCII strings see
OpenOffice.org's Documentation of the Microsoft Excel File Format, sect.
2.5.3
Converts a UTF-8 string into BIFF8 Unicode string data (16-bit string length)
Writes the string using uncompressed notation, no rich text, no Asian phonetics
If mbstring extension is not available, ASCII is assumed, and compressed
notation is used although this will give wrong results for non-ASCII strings see
OpenOffice.org's Documentation of the Microsoft Excel File Format, sect.
2.5.3
Parameters
- $value
string $value UTF-8 encoded string
Returns
string
|
public static
string
|
#
ConvertEncoding( string $value, string $to, string $from )
Convert string from one encoding to another. First try mbstring, then iconv,
or no convertion
Convert string from one encoding to another. First try mbstring, then iconv,
or no convertion
Parameters
- $value
string $value
- $to
string $to Encoding to convert to, e.g. 'UTF-8'
- $from
string $from Encoding to convert from, e.g. 'UTF-16LE'
Returns
string
|
public static
integer
|
#
CountCharacters( string $value, string $enc = 'UTF-8' )
Get character count. First try mbstring, then iconv, finally strlen
Get character count. First try mbstring, then iconv, finally strlen
Parameters
- $value
string $value
- $enc
string $enc Encoding
Returns
integer Character count
|