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 - 2009 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 - 2009 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 $_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 ]

$_hashIndex =

[line 454]

Hash index

Hash index




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

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

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

[ 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 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 getHashIndex [line 464]

string getHashIndex( )

Get hash index Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.

Get hash index Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.




Tags:

return:  Hash index
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 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 getXActiveCell [line 217]

string getXActiveCell( )

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 getXSelectedCells [line 206]

string getXSelectedCells( )

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 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 setHashIndex [line 476]

void setHashIndex( string $value)

Set hash index Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.

Set hash index Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.




Tags:

access:  public


Parameters:

string   $value   Hash index

[ Top ]

method __clone [line 483]

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, 10 Aug 2009 08:06:43 +0200 by phpDocumentor 1.4.1