Documentation

DataType
in package

Table of Contents

Constants

MAX_STRING_LENGTH  = 32767
TYPE_BOOL  = 'b'
TYPE_ERROR  = 'e'
TYPE_FORMULA  = 'f'
TYPE_INLINE  = 'inlineStr'
TYPE_ISO_DATE  = 'd'
TYPE_NULL  = 'null'
TYPE_NUMERIC  = 'n'
TYPE_STRING  = 's'
TYPE_STRING2  = 'str'

Properties

$errorCodes  : array<string, int>
List of error codes.

Methods

checkErrorCode()  : string
Check a value that it is a valid error code.
checkString()  : RichText|string
Check a string that it satisfies Excel requirements.
getErrorCodes()  : array<string, int>
Get list of error codes.

Constants

MAX_STRING_LENGTH

public mixed MAX_STRING_LENGTH = 32767

TYPE_ERROR

public mixed TYPE_ERROR = 'e'

TYPE_FORMULA

public mixed TYPE_FORMULA = 'f'

TYPE_INLINE

public mixed TYPE_INLINE = 'inlineStr'

TYPE_ISO_DATE

public mixed TYPE_ISO_DATE = 'd'

TYPE_NULL

public mixed TYPE_NULL = 'null'

TYPE_NUMERIC

public mixed TYPE_NUMERIC = 'n'

TYPE_STRING

public mixed TYPE_STRING = 's'

TYPE_STRING2

public mixed TYPE_STRING2 = 'str'

Properties

$errorCodes

List of error codes.

private static array<string, int> $errorCodes = ['#NULL!' => 0, '#DIV/0!' => 1, '#VALUE!' => 2, '#REF!' => 3, '#NAME?' => 4, '#NUM!' => 5, '#N/A' => 6, '#CALC!' => 7]

Methods

checkErrorCode()

Check a value that it is a valid error code.

public static checkErrorCode(mixed $value) : string
Parameters
$value : mixed

Value to sanitize to an Excel error code

Return values
string

Sanitized value

checkString()

Check a string that it satisfies Excel requirements.

public static checkString(null|RichText|string $textValue) : RichText|string
Parameters
$textValue : null|RichText|string

Value to sanitize to an Excel string

Return values
RichText|string

Sanitized value

getErrorCodes()

Get list of error codes.

public static getErrorCodes() : array<string, int>
Return values
array<string, int>

        
On this page

Search results