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 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)

Implements interfaces:

Variables

Constants

Methods



Class Details

[line 54]
PHPExcel_Style_NumberFormat

PHPExcel_Style_NumberFormat




Tags:

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


[ Top ]


Class Variables

static $_builtInFormats =

[line 101]

Excel built-in number formats

Excel built-in number formats




Tags:

access:  private

Type:   array


[ Top ]

static $_dateFormatReplacements = array(
         // first remove escapes related to non-format characters
         '\\'   => '',
         //   12-hour suffix
         'am/pm'   => 'A',
         //   4-digit year
         'yyyy'   => 'Y',
         //   2-digit year
         'yy'   => 'y',
         //   first letter of month - no php equivalent
         'mmmmm'   => 'M',
         //   full month name
         'mmmm'   => 'F',
         //   short month name
         'mmm'   => 'M',
         //   mm is minutes if time or month w/leading zero
         ':mm'   => ':i',
         //   month leading zero
         'mm'   => 'm',
         //   month no leading zero
         'm'      => 'n',
         //   full day of week name
         'dddd'   => 'l',
         //   short day of week name
         'ddd'   => 'D',
         //   days leading zero
         'dd'   => 'd',
         //   days no leading zero
         'd'      => 'j',
         //   seconds
         'ss'   => 's',
         //   fractional seconds - no php equivalent
         '.s'   => ''
      )

[line 463]



Tags:

access:  private

Type:   mixed


[ Top ]

static $_dateFormatReplacements12 = array(
         'hh'   => 'h',
         'h'      => 'g'
      )

[line 501]



Tags:

access:  private

Type:   mixed


[ Top ]

static $_dateFormatReplacements24 = array(
         'hh'   => 'H',
         'h'      => 'G'
      )

[line 497]



Tags:

access:  private

Type:   mixed


[ Top ]

static $_flippedBuiltInFormats =

[line 108]

Excel built-in number formats (flipped, for faster lookups)

Excel built-in number formats (flipped, for faster lookups)




Tags:

access:  private

Type:   array


[ Top ]

$_builtInFormatCode =

[line 122]

Built-in format Code

Built-in format Code




Tags:

access:  private

Type:   string


[ Top ]

$_formatCode =

[line 115]

Format Code

Format Code




Tags:

access:  private

Type:   string


[ Top ]

$_isSupervisor =

[line 136]

Supervisor?

Supervisor?




Tags:

access:  private

Type:   boolean


[ Top ]

$_parent =

[line 143]

Parent.

Parent. Only used for supervisor




Tags:

access:  private

Type:   PHPExcel_Style


[ Top ]

$_parentPropertyName =

[line 129]

Parent Borders

Parent Borders




Tags:

var:  string
access:  private

Type:   _parentPropertyName


[ Top ]



Class Methods


static method builtInFormatCode [line 400]

static string builtInFormatCode( int $pIndex)

Get built-in format code

Get built-in format code




Tags:

access:  public


Parameters:

int   $pIndex  

[ Top ]

static method builtInFormatCodeIndex [line 421]

static int|boolean builtInFormatCodeIndex( string $formatCode)

Get built-in format code index

Get built-in format code index




Tags:

access:  public


Parameters:

string   $formatCode  

[ Top ]

static method fillBuiltInFormatCodes [line 332]

static void fillBuiltInFormatCodes( )

Fill built-in format codes

Fill built-in format codes




Tags:

access:  private


[ Top ]

static method toFormattedString [line 514]

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

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

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 248]

PHPExcel_Style_NumberFormat applyFromArray( [array $pStyles = null])

Apply styles from array

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 164]

PHPExcel_Style_NumberFormat bindParent( PHPExcel_Style $parent)

Bind parent.

Bind parent. Only used for supervisor




Tags:

access:  public


Parameters:

PHPExcel_Style   $parent  

[ Top ]

constructor __construct [line 148]

PHPExcel_Style_NumberFormat __construct( [ $isSupervisor = false])

Create a new PHPExcel_Style_NumberFormat

Create a new PHPExcel_Style_NumberFormat




Tags:

access:  public


Parameters:

   $isSupervisor  

[ Top ]

method getActiveCell [line 217]

string getActiveCell( )

Get the currently active cell coordinate in currently active sheet.

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 195]

PHPExcel_Worksheet getActiveSheet( )

Get the currently active sheet.

Get the currently active sheet. Only used for supervisor




Tags:

access:  public


[ Top ]

method getBuiltInFormatCode [line 304]

int getBuiltInFormatCode( )

Get Built-In Format Code

Get Built-In Format Code




Tags:

access:  public


[ Top ]

method getFormatCode [line 268]

string getFormatCode( )

Get Format Code

Get Format Code




Tags:

access:  public


[ Top ]

method getHashCode [line 438]

string getHashCode( )

Get hash code

Get hash code




Tags:

return:  Hash code
access:  public


[ Top ]

method getIsSupervisor [line 174]

boolean getIsSupervisor( )

Is this a supervisor or a real style component?

Is this a supervisor or a real style component?




Tags:

access:  public


[ Top ]

method getSelectedCells [line 206]

string getSelectedCells( )

Get the currently active cell coordinate in currently active sheet.

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 185]

PHPExcel_Style_NumberFormat getSharedComponent( )

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

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 228]

array getStyleArray( array $array)

Build style array from subcomponents

Build style array from subcomponents




Tags:

access:  public


Parameters:

array   $array  

[ Top ]

method setBuiltInFormatCode [line 317]

PHPExcel_Style_NumberFormat setBuiltInFormatCode( [int $pValue = 0])

Set Built-In Format Code

Set Built-In Format Code




Tags:

access:  public


Parameters:

int   $pValue  

[ Top ]

method setFormatCode [line 285]

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

Set Format Code

Set Format Code




Tags:

access:  public


Parameters:

string   $pValue  

[ Top ]

method __clone [line 452]

void __clone( )

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

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 94]


[ Top ]

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

[line 93]


[ Top ]

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

[line 92]


[ Top ]

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

[line 81]


[ Top ]

FORMAT_DATE_DDMMYYYY =  'dd/mm/yy'

[line 71]


[ Top ]

FORMAT_DATE_DMMINUS =  'd-m'

[line 74]


[ Top ]

FORMAT_DATE_DMYMINUS =  'd-m-y'

[line 73]


[ Top ]

FORMAT_DATE_DMYSLASH =  'd/m/y'

[line 72]


[ Top ]

FORMAT_DATE_MYMINUS =  'm-y'

[line 75]


[ Top ]

FORMAT_DATE_TIME1 =  'h:mm AM/PM'

[line 82]


[ Top ]

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

[line 83]


[ Top ]

FORMAT_DATE_TIME3 =  'h:mm'

[line 84]


[ Top ]

FORMAT_DATE_TIME4 =  'h:mm:ss'

[line 85]


[ Top ]

FORMAT_DATE_TIME5 =  'mm:ss'

[line 86]


[ Top ]

FORMAT_DATE_TIME6 =  'h:mm:ss'

[line 87]


[ Top ]

FORMAT_DATE_TIME7 =  'i:s.S'

[line 88]


[ Top ]

FORMAT_DATE_TIME8 =  'h:mm:ss;@'

[line 89]


[ Top ]

FORMAT_DATE_XLSX14 =  'mm-dd-yy'

[line 76]


[ Top ]

FORMAT_DATE_XLSX15 =  'd-mmm-yy'

[line 77]


[ Top ]

FORMAT_DATE_XLSX16 =  'd-mmm'

[line 78]


[ Top ]

FORMAT_DATE_XLSX17 =  'mmm-yy'

[line 79]


[ Top ]

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

[line 80]


[ Top ]

FORMAT_DATE_YYYYMMDD =  'yy-mm-dd'

[line 70]


[ Top ]

FORMAT_DATE_YYYYMMDD2 =  'yyyy-mm-dd'

[line 69]


[ Top ]

FORMAT_DATE_YYYYMMDDSLASH =  'yy/mm/dd;@'

[line 90]


[ Top ]

FORMAT_GENERAL =  'General'

[line 57]


[ Top ]

FORMAT_NUMBER =  '0'

[line 61]


[ Top ]

FORMAT_NUMBER_00 =  '0.00'

[line 62]


[ Top ]

FORMAT_NUMBER_COMMA_SEPARATED1 =  '#,##0.00'

[line 63]


[ Top ]

FORMAT_NUMBER_COMMA_SEPARATED2 =  '#,##0.00_-'

[line 64]


[ Top ]

FORMAT_PERCENTAGE =  '0%'

[line 66]


[ Top ]

FORMAT_PERCENTAGE_00 =  '0.00%'

[line 67]


[ Top ]

FORMAT_TEXT =  '@'

[line 59]


[ Top ]



Documentation generated on Mon, 11 Jan 2010 08:12:15 +0100 by phpDocumentor 1.4.1