PHPExcel_Style
[ class tree: PHPExcel_Style ] [ index: PHPExcel_Style ] [ all elements ]

Class: PHPExcel_Style_NumberFormat

Source Location: /PHPExcel/Style/NumberFormat.php

Class Overview


PHPExcel_Style_NumberFormat


Author(s):

Copyright:

  • Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

Implements interfaces:

Constants

Methods



Class Details

[line 36]
PHPExcel_Style_NumberFormat



Tags:

copyright:  Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)


[ Top ]


Class Methods


static method builtInFormatCode [line 394]

static string builtInFormatCode( int $pIndex)

Get built-in format code



Tags:

access:  public


Parameters:

int   $pIndex  

[ Top ]

static method builtInFormatCodeIndex [line 416]

static int|boolean builtInFormatCodeIndex( string $formatCode)

Get built-in format code index



Tags:

access:  public


Parameters:

string   $formatCode  

[ Top ]

static method toFormattedString [line 528]

static string toFormattedString( [mixed $value = ''], [string $format = ''], [array $callBack = null])

Convert a value in a pre-defined format to a PHP string



Tags:

return:  Formatted string
access:  public


Parameters:

mixed   $value   Value to format
string   $format   Format code
array   $callBack   Callback function for additional formatting of string

[ Top ]

method applyFromArray [line 237]

PHPExcel_Style_NumberFormat applyFromArray( [array $pStyles = null])

Apply styles from array

  1.  $objPHPExcel->getActiveSheet()->getStyle('B2')->getNumberFormat()->applyFromArray(
  2.         array(
  3.             'code' => PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE
  4.         )
  5.  );




Tags:

throws:  Exception
access:  public


Parameters:

array   $pStyles   Array containing style information

[ Top ]

method bindParent [line 153]

PHPExcel_Style_NumberFormat bindParent( PHPExcel_Style $parent)

Bind parent. Only used for supervisor



Tags:

access:  public


Parameters:

PHPExcel_Style   $parent  

[ Top ]

constructor __construct [line 137]

PHPExcel_Style_NumberFormat __construct( [boolean $isSupervisor = false], [boolean $isConditional = false])

Create a new PHPExcel_Style_NumberFormat



Tags:

access:  public


Parameters:

boolean   $isSupervisor   Flag indicating if this is a supervisor or not Leave this value at default unless you understand exactly what its ramifications are
boolean   $isConditional   Flag indicating if this is a conditional style or not Leave this value at default unless you understand exactly what its ramifications are

[ Top ]

method getActiveCell [line 206]

string getActiveCell( )

Get the currently active cell coordinate in currently active sheet.

Only used for supervisor




Tags:

return:  E.g. 'A1'
access:  public


[ Top ]

method getActiveSheet [line 184]

PHPExcel_Worksheet getActiveSheet( )

Get the currently active sheet. Only used for supervisor



Tags:

access:  public


[ Top ]

method getBuiltInFormatCode [line 296]

int getBuiltInFormatCode( )

Get Built-In Format Code



Tags:

access:  public


[ Top ]

method getFormatCode [line 258]

string getFormatCode( )

Get Format Code



Tags:

access:  public


[ Top ]

method getHashCode [line 434]

string getHashCode( )

Get hash code



Tags:

return:  Hash code
access:  public


[ Top ]

method getIsSupervisor [line 163]

boolean getIsSupervisor( )

Is this a supervisor or a real style component?



Tags:

access:  public


[ Top ]

method getSelectedCells [line 195]

string getSelectedCells( )

Get the currently active cell coordinate in currently active sheet.

Only used for supervisor




Tags:

return:  E.g. 'A1'
access:  public


[ Top ]

method getSharedComponent [line 174]

PHPExcel_Style_NumberFormat getSharedComponent( )

Get the shared style component for the currently active cell in currently active sheet.

Only used for style supervisor




Tags:

access:  public


[ Top ]

method getStyleArray [line 217]

array getStyleArray( array $array)

Build style array from subcomponents



Tags:

access:  public


Parameters:

array   $array  

[ Top ]

method setBuiltInFormatCode [line 310]

PHPExcel_Style_NumberFormat setBuiltInFormatCode( [int $pValue = 0])

Set Built-In Format Code



Tags:

access:  public


Parameters:

int   $pValue  

[ Top ]

method setFormatCode [line 276]

PHPExcel_Style_NumberFormat setFormatCode( [string $pValue = PHPExcel_Style_NumberFormat::FORMAT_GENERAL])

Set Format Code



Tags:

access:  public


Parameters:

string   $pValue  

[ Top ]

method __clone [line 449]

void __clone( )

Implement PHP __clone to create a deep clone, not just a shallow copy.



Tags:

access:  public


[ Top ]


Class Constants

FORMAT_CURRENCY_EUR_SIMPLE =  '[$EUR ]#,##0.00_-'

[line 76]


[ Top ]

FORMAT_CURRENCY_USD =  '$#,##0_-'

[line 75]


[ Top ]

FORMAT_CURRENCY_USD_SIMPLE =  '"$"#,##0.00_-'

[line 74]


[ Top ]

FORMAT_DATE_DATETIME =  'd/m/y h:mm'

[line 63]


[ Top ]

FORMAT_DATE_DDMMYYYY =  'dd/mm/yy'

[line 53]


[ Top ]

FORMAT_DATE_DMMINUS =  'd-m'

[line 56]


[ Top ]

FORMAT_DATE_DMYMINUS =  'd-m-y'

[line 55]


[ Top ]

FORMAT_DATE_DMYSLASH =  'd/m/y'

[line 54]


[ Top ]

FORMAT_DATE_MYMINUS =  'm-y'

[line 57]


[ Top ]

FORMAT_DATE_TIME1 =  'h:mm AM/PM'

[line 64]


[ Top ]

FORMAT_DATE_TIME2 =  'h:mm:ss AM/PM'

[line 65]


[ Top ]

FORMAT_DATE_TIME3 =  'h:mm'

[line 66]


[ Top ]

FORMAT_DATE_TIME4 =  'h:mm:ss'

[line 67]


[ Top ]

FORMAT_DATE_TIME5 =  'mm:ss'

[line 68]


[ Top ]

FORMAT_DATE_TIME6 =  'h:mm:ss'

[line 69]


[ Top ]

FORMAT_DATE_TIME7 =  'i:s.S'

[line 70]


[ Top ]

FORMAT_DATE_TIME8 =  'h:mm:ss;@'

[line 71]


[ Top ]

FORMAT_DATE_XLSX14 =  'mm-dd-yy'

[line 58]


[ Top ]

FORMAT_DATE_XLSX15 =  'd-mmm-yy'

[line 59]


[ Top ]

FORMAT_DATE_XLSX16 =  'd-mmm'

[line 60]


[ Top ]

FORMAT_DATE_XLSX17 =  'mmm-yy'

[line 61]


[ Top ]

FORMAT_DATE_XLSX22 =  'm/d/yy h:mm'

[line 62]


[ Top ]

FORMAT_DATE_YYYYMMDD =  'yy-mm-dd'

[line 52]


[ Top ]

FORMAT_DATE_YYYYMMDD2 =  'yyyy-mm-dd'

[line 51]


[ Top ]

FORMAT_DATE_YYYYMMDDSLASH =  'yy/mm/dd;@'

[line 72]


[ Top ]

FORMAT_GENERAL =  'General'

[line 39]


[ Top ]

FORMAT_NUMBER =  '0'

[line 43]


[ Top ]

FORMAT_NUMBER_00 =  '0.00'

[line 44]


[ Top ]

FORMAT_NUMBER_COMMA_SEPARATED1 =  '#,##0.00'

[line 45]


[ Top ]

FORMAT_NUMBER_COMMA_SEPARATED2 =  '#,##0.00_-'

[line 46]


[ Top ]

FORMAT_PERCENTAGE =  '0%'

[line 48]


[ Top ]

FORMAT_PERCENTAGE_00 =  '0.00%'

[line 49]


[ Top ]

FORMAT_TEXT =  '@'

[line 41]


[ Top ]



Documentation generated on Fri, 12 Oct 2012 00:16:44 +0200 by phpDocumentor 1.4.4