ILIAS
eassessment Revision 61809
|
Public Member Functions | |
__construct ($isSupervisor=false) | |
Create a new PHPExcel_Style_NumberFormat. | |
bindParent ($parent) | |
Bind parent. | |
getIsSupervisor () | |
Is this a supervisor or a real style component? | |
getSharedComponent () | |
Get the shared style component for the currently active cell in currently active sheet. | |
getActiveSheet () | |
Get the currently active sheet. | |
getSelectedCells () | |
Get the currently active cell coordinate in currently active sheet. | |
getActiveCell () | |
Get the currently active cell coordinate in currently active sheet. | |
getStyleArray ($array) | |
Build style array from subcomponents. | |
applyFromArray ($pStyles=null) | |
Apply styles from array. | |
getFormatCode () | |
Get Format Code. | |
setFormatCode ($pValue=PHPExcel_Style_NumberFormat::FORMAT_GENERAL) | |
Set Format Code. | |
getBuiltInFormatCode () | |
Get Built-In Format Code. | |
setBuiltInFormatCode ($pValue=0) | |
Set Built-In Format Code. | |
getHashCode () | |
Get hash code. | |
__clone () | |
Implement PHP __clone to create a deep clone, not just a shallow copy. |
Static Public Member Functions | |
static | builtInFormatCode ($pIndex) |
Get built-in format code. | |
static | builtInFormatCodeIndex ($formatCode) |
Get built-in format code index. | |
static | toFormattedString ($value= '', $format= '', $callBack=null) |
Convert a value in a pre-defined format to a PHP string. |
Data Fields | |
const | FORMAT_GENERAL = 'General' |
const | FORMAT_TEXT = '@' |
const | FORMAT_NUMBER = '0' |
const | FORMAT_NUMBER_00 = '0.00' |
const | FORMAT_NUMBER_COMMA_SEPARATED1 = '#,##0.00' |
const | FORMAT_NUMBER_COMMA_SEPARATED2 = '#,##0.00_-' |
const | FORMAT_PERCENTAGE = '0%' |
const | FORMAT_PERCENTAGE_00 = '0.00%' |
const | FORMAT_DATE_YYYYMMDD2 = 'yyyy-mm-dd' |
const | FORMAT_DATE_YYYYMMDD = 'yy-mm-dd' |
const | FORMAT_DATE_DDMMYYYY = 'dd/mm/yy' |
const | FORMAT_DATE_DMYSLASH = 'd/m/y' |
const | FORMAT_DATE_DMYMINUS = 'd-m-y' |
const | FORMAT_DATE_DMMINUS = 'd-m' |
const | FORMAT_DATE_MYMINUS = 'm-y' |
const | FORMAT_DATE_XLSX14 = 'mm-dd-yy' |
const | FORMAT_DATE_XLSX15 = 'd-mmm-yy' |
const | FORMAT_DATE_XLSX16 = 'd-mmm' |
const | FORMAT_DATE_XLSX17 = 'mmm-yy' |
const | FORMAT_DATE_XLSX22 = 'm/d/yy h:mm' |
const | FORMAT_DATE_DATETIME = 'd/m/y h:mm' |
const | FORMAT_DATE_TIME1 = 'h:mm AM/PM' |
const | FORMAT_DATE_TIME2 = 'h:mm:ss AM/PM' |
const | FORMAT_DATE_TIME3 = 'h:mm' |
const | FORMAT_DATE_TIME4 = 'h:mm:ss' |
const | FORMAT_DATE_TIME5 = 'mm:ss' |
const | FORMAT_DATE_TIME6 = 'h:mm:ss' |
const | FORMAT_DATE_TIME7 = 'i:s.S' |
const | FORMAT_DATE_TIME8 = 'h:mm:ss;@' |
const | FORMAT_DATE_YYYYMMDDSLASH = 'yy/mm/dd;@' |
const | FORMAT_CURRENCY_USD_SIMPLE = '"$"#,##0.00_-' |
const | FORMAT_CURRENCY_USD = '$#,##0_-' |
const | FORMAT_CURRENCY_EUR_SIMPLE = '[$EUR ]#,##0.00_-' |
Static Private Member Functions | |
static | fillBuiltInFormatCodes () |
Fill built-in format codes. |
Private Attributes | |
$_formatCode = PHPExcel_Style_NumberFormat::FORMAT_GENERAL | |
$_builtInFormatCode = 0 | |
$_parentPropertyName | |
$_isSupervisor | |
$_parent |
Static Private Attributes | |
static | $_builtInFormats |
static | $_flippedBuiltInFormats |
static | $_dateFormatReplacements |
static | $_dateFormatReplacements24 |
static | $_dateFormatReplacements12 |
Definition at line 36 of file NumberFormat.php.
PHPExcel_Style_NumberFormat::__construct | ( | $isSupervisor = false | ) |
Create a new PHPExcel_Style_NumberFormat.
Definition at line 130 of file NumberFormat.php.
PHPExcel_Style_NumberFormat::__clone | ( | ) |
Implement PHP __clone to create a deep clone, not just a shallow copy.
Definition at line 438 of file NumberFormat.php.
PHPExcel_Style_NumberFormat::applyFromArray | ( | $pStyles = null | ) |
Apply styles from array.
$objPHPExcel->getActiveSheet()->getStyle('B2')->getNumberFormat()->applyFromArray( array( 'code' => PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE ) );
array | $pStyles | Array containing style information |
Exception |
Definition at line 226 of file NumberFormat.php.
References getActiveSheet(), getSelectedCells(), getStyleArray(), and setFormatCode().
PHPExcel_Style_NumberFormat::bindParent | ( | $parent | ) |
Bind parent.
Only used for supervisor
PHPExcel_Style | $parent |
Definition at line 142 of file NumberFormat.php.
|
static |
Get built-in format code.
int | $pIndex |
Definition at line 383 of file NumberFormat.php.
References fillBuiltInFormatCodes().
Referenced by PHPExcel_Reader_Excel5\_readXf(), getFormatCode(), PHPExcel_Reader_Excel2007\load(), and setBuiltInFormatCode().
|
static |
Get built-in format code index.
string | $formatCode |
Definition at line 405 of file NumberFormat.php.
References fillBuiltInFormatCodes().
Referenced by setFormatCode().
|
staticprivate |
Fill built-in format codes.
Definition at line 315 of file NumberFormat.php.
References FORMAT_GENERAL.
Referenced by builtInFormatCode(), and builtInFormatCodeIndex().
PHPExcel_Style_NumberFormat::getActiveCell | ( | ) |
Get the currently active cell coordinate in currently active sheet.
Only used for supervisor
Definition at line 195 of file NumberFormat.php.
References getActiveSheet().
PHPExcel_Style_NumberFormat::getActiveSheet | ( | ) |
Get the currently active sheet.
Only used for supervisor
Definition at line 173 of file NumberFormat.php.
Referenced by applyFromArray(), getActiveCell(), getSelectedCells(), setBuiltInFormatCode(), and setFormatCode().
PHPExcel_Style_NumberFormat::getBuiltInFormatCode | ( | ) |
Get Built-In Format Code.
Definition at line 285 of file NumberFormat.php.
References $_builtInFormatCode, and getSharedComponent().
PHPExcel_Style_NumberFormat::getFormatCode | ( | ) |
Get Format Code.
Definition at line 247 of file NumberFormat.php.
References $_formatCode, builtInFormatCode(), and getSharedComponent().
Referenced by PHPExcel_Shared_Date\isDateTimeFormat().
PHPExcel_Style_NumberFormat::getHashCode | ( | ) |
Get hash code.
Implements PHPExcel_IComparable.
Definition at line 423 of file NumberFormat.php.
References getSharedComponent().
PHPExcel_Style_NumberFormat::getIsSupervisor | ( | ) |
Is this a supervisor or a real style component?
Definition at line 152 of file NumberFormat.php.
References $_isSupervisor.
PHPExcel_Style_NumberFormat::getSelectedCells | ( | ) |
Get the currently active cell coordinate in currently active sheet.
Only used for supervisor
Definition at line 184 of file NumberFormat.php.
References getActiveSheet().
Referenced by applyFromArray(), setBuiltInFormatCode(), and setFormatCode().
PHPExcel_Style_NumberFormat::getSharedComponent | ( | ) |
Get the shared style component for the currently active cell in currently active sheet.
Only used for style supervisor
Definition at line 163 of file NumberFormat.php.
Referenced by getBuiltInFormatCode(), getFormatCode(), and getHashCode().
PHPExcel_Style_NumberFormat::getStyleArray | ( | $array | ) |
Build style array from subcomponents.
array | $array |
Definition at line 206 of file NumberFormat.php.
Referenced by applyFromArray(), setBuiltInFormatCode(), and setFormatCode().
PHPExcel_Style_NumberFormat::setBuiltInFormatCode | ( | $pValue = 0 | ) |
Set Built-In Format Code.
int | $pValue |
Definition at line 299 of file NumberFormat.php.
References builtInFormatCode(), getActiveSheet(), getSelectedCells(), and getStyleArray().
PHPExcel_Style_NumberFormat::setFormatCode | ( | $pValue = PHPExcel_Style_NumberFormat::FORMAT_GENERAL | ) |
Set Format Code.
string | $pValue |
Definition at line 265 of file NumberFormat.php.
References builtInFormatCodeIndex(), FORMAT_GENERAL, getActiveSheet(), getSelectedCells(), and getStyleArray().
Referenced by applyFromArray().
|
static |
Convert a value in a pre-defined format to a PHP string.
mixed | $value | Value to format |
string | $format | Format code |
array | $callBack | Callback function for additional formatting of string |
Definition at line 501 of file NumberFormat.php.
References PHPExcel_Shared_Date\ExcelToPHPObject(), FORMAT_GENERAL, FORMAT_TEXT, PHPExcel_Calculation_MathTrig\GCD(), PHPExcel_Shared_String\getCurrencyCode(), PHPExcel_Shared_String\getDecimalSeparator(), and PHPExcel_Shared_String\getThousandsSeparator().
Referenced by PHPExcel_Writer_HTML\_generateRow(), PHPExcel_Worksheet\calculateColumnWidths(), PHPExcel_Cell\getFormattedValue(), PHPExcel_Worksheet\rangeToArray(), and PHPExcel_Calculation_TextData\TEXTFORMAT().
|
private |
Definition at line 104 of file NumberFormat.php.
Referenced by getBuiltInFormatCode().
|
staticprivate |
Definition at line 83 of file NumberFormat.php.
|
staticprivate |
Definition at line 450 of file NumberFormat.php.
|
staticprivate |
Definition at line 488 of file NumberFormat.php.
|
staticprivate |
Definition at line 484 of file NumberFormat.php.
|
staticprivate |
Definition at line 90 of file NumberFormat.php.
|
private |
Definition at line 97 of file NumberFormat.php.
Referenced by getFormatCode().
|
private |
Definition at line 118 of file NumberFormat.php.
Referenced by getIsSupervisor().
|
private |
Definition at line 125 of file NumberFormat.php.
|
private |
Definition at line 111 of file NumberFormat.php.
const PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE = '[$EUR ]#,##0.00_-' |
Definition at line 76 of file NumberFormat.php.
const PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD = '$#,##0_-' |
Definition at line 75 of file NumberFormat.php.
const PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE = '"$"#,##0.00_-' |
Definition at line 74 of file NumberFormat.php.
const PHPExcel_Style_NumberFormat::FORMAT_DATE_DATETIME = 'd/m/y h:mm' |
Definition at line 63 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode(), and ilExcelXMLAdapter\setCellValue().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_DDMMYYYY = 'dd/mm/yy' |
Definition at line 53 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_DMMINUS = 'd-m' |
Definition at line 56 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_DMYMINUS = 'd-m-y' |
Definition at line 55 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_DMYSLASH = 'd/m/y' |
Definition at line 54 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_MYMINUS = 'm-y' |
Definition at line 57 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME1 = 'h:mm AM/PM' |
Definition at line 64 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME2 = 'h:mm:ss AM/PM' |
Definition at line 65 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME3 = 'h:mm' |
Definition at line 66 of file NumberFormat.php.
Referenced by PHPExcel_Cell_AdvancedValueBinder\bindValue(), and PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME4 = 'h:mm:ss' |
Definition at line 67 of file NumberFormat.php.
Referenced by PHPExcel_Cell_AdvancedValueBinder\bindValue(), PHPExcel_Shared_Date\isDateTimeFormatCode(), and PHPExcel_Reader_OOCalc\loadIntoExisting().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME5 = 'mm:ss' |
Definition at line 68 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME6 = 'h:mm:ss' |
Definition at line 69 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME7 = 'i:s.S' |
Definition at line 70 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME8 = 'h:mm:ss;@' |
Definition at line 71 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX14 = 'mm-dd-yy' |
Definition at line 58 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX15 = 'd-mmm-yy' |
Definition at line 59 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode(), and PHPExcel_Reader_OOCalc\loadIntoExisting().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX16 = 'd-mmm' |
Definition at line 60 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX17 = 'mmm-yy' |
Definition at line 61 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX22 = 'm/d/yy h:mm' |
Definition at line 62 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDD = 'yy-mm-dd' |
Definition at line 52 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDD2 = 'yyyy-mm-dd' |
Definition at line 51 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDDSLASH = 'yy/mm/dd;@' |
Definition at line 72 of file NumberFormat.php.
Referenced by PHPExcel_Shared_Date\isDateTimeFormatCode().
const PHPExcel_Style_NumberFormat::FORMAT_GENERAL = 'General' |
Definition at line 39 of file NumberFormat.php.
Referenced by fillBuiltInFormatCodes(), PHPExcel_Reader_Excel2007\load(), setFormatCode(), and toFormattedString().
const PHPExcel_Style_NumberFormat::FORMAT_NUMBER = '0' |
Definition at line 43 of file NumberFormat.php.
const PHPExcel_Style_NumberFormat::FORMAT_NUMBER_00 = '0.00' |
Definition at line 44 of file NumberFormat.php.
const PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1 = '#,##0.00' |
Definition at line 45 of file NumberFormat.php.
const PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2 = '#,##0.00_-' |
Definition at line 46 of file NumberFormat.php.
const PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE = '0%' |
Definition at line 48 of file NumberFormat.php.
Referenced by PHPExcel_Cell_AdvancedValueBinder\bindValue(), and ilExcelXMLAdapter\setCellValue().
const PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00 = '0.00%' |
Definition at line 49 of file NumberFormat.php.
const PHPExcel_Style_NumberFormat::FORMAT_TEXT = '@' |
Definition at line 41 of file NumberFormat.php.
Referenced by toFormattedString().