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 40]
PHPExcel_Style_NumberFormat

PHPExcel_Style_NumberFormat




Tags:

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


[ Top ]


Class Variables

static $_builtInFormats =

[line 79]

Excel built-in number formats

Excel built-in number formats




Tags:

access:  private

Type:   array


[ Top ]

$_formatCode =

[line 86]

Format Code

Format Code




Tags:

access:  private

Type:   string


[ Top ]

$_hashIndex =

[line 297]

Hash index

Hash index




Tags:

access:  private

Type:   string


[ Top ]

$_parent =

[line 94]

Parent Style

Parent Style




Tags:

access:  private

Type:   PHPExcel_Style


[ Top ]

$_parentPropertyName =

[line 101]

Parent Borders

Parent Borders




Tags:

var:  string
access:  private

Type:   _parentPropertyName


[ Top ]



Class Methods


static method builtInFormatCode [line 216]

static string builtInFormatCode( int $pIndex)

Get built-in format code

Get built-in format code




Tags:

access:  public


Parameters:

int   $pIndex  

[ Top ]

static method toFormattedString [line 344]

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

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

constructor __construct [line 106]

PHPExcel_Style_NumberFormat __construct( )

Create a new PHPExcel_Style_NumberFormat

Create a new PHPExcel_Style_NumberFormat




Tags:

access:  public


[ Top ]

method getFormatCode [line 194]

string getFormatCode( )

Get Format Code

Get Format Code




Tags:

access:  public


[ Top ]

method getHashCode [line 284]

string getHashCode( )

Get hash code

Get hash code




Tags:

return:  Hash code
access:  public


[ Top ]

method getHashIndex [line 307]

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 propertyBeginBind [line 152]

PHPExcel_Style_NumberFormat propertyBeginBind( )

Property Begin Bind If no PHPExcel_Style_NumberFormat has been bound to PHPExcel_Style then bind this one.

Property Begin Bind If no PHPExcel_Style_NumberFormat has been bound to PHPExcel_Style then bind this one. Return the actual bound one.




Tags:

access:  private


[ Top ]

method propertyGetBound [line 135]

PHPExcel_Style_NumberFormat propertyGetBound( )

Property Get Bound

Property Get Bound Returns the PHPExcel_Style_NumberFormat that is actual bound to PHPExcel_Style




Tags:

access:  private


[ Top ]

method propertyPrepareBind [line 120]

void propertyPrepareBind( $parent $parent, $parentPropertyName $parentPropertyName)

Property Prepare bind

Property Prepare bind Configures this object for late binding as a property of a parent object




Tags:

access:  public


Parameters:

$parent   $parent  
$parentPropertyName   $parentPropertyName  

[ Top ]

method setFormatCode [line 203]

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

Set Format Code

Set Format Code




Tags:

access:  public


Parameters:

string   $pValue  

[ Top ]

method setHashIndex [line 319]

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

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


[ Top ]

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

[line 71]


[ Top ]

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

[line 70]


[ Top ]

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

[line 59]


[ Top ]

FORMAT_DATE_DDMMYYYY =  'dd/mm/yy'

[line 54]


[ Top ]

FORMAT_DATE_DMMINUS =  'd-m'

[line 57]


[ Top ]

FORMAT_DATE_DMYMINUS =  'd-m-y'

[line 56]


[ Top ]

FORMAT_DATE_DMYSLASH =  'd/m/y'

[line 55]


[ Top ]

FORMAT_DATE_MYMINUS =  'm-y'

[line 58]


[ Top ]

FORMAT_DATE_TIME1 =  'h:mm AM/PM'

[line 60]


[ Top ]

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

[line 61]


[ Top ]

FORMAT_DATE_TIME3 =  'h:mm'

[line 62]


[ Top ]

FORMAT_DATE_TIME4 =  'h:mm:ss'

[line 63]


[ Top ]

FORMAT_DATE_TIME5 =  'mm:ss'

[line 64]


[ Top ]

FORMAT_DATE_TIME6 =  'h:mm:ss'

[line 65]


[ Top ]

FORMAT_DATE_TIME7 =  'i:s.S'

[line 66]


[ Top ]

FORMAT_DATE_TIME8 =  'h:mm:ss;@'

[line 67]


[ Top ]

FORMAT_DATE_YYYYMMDD =  'yy-mm-dd'

[line 53]


[ Top ]

FORMAT_DATE_YYYYMMDDSLASH =  'yy/mm/dd;@'

[line 68]


[ Top ]

FORMAT_GENERAL =  'General'

[line 43]


[ Top ]

FORMAT_NUMBER =  '0'

[line 45]


[ Top ]

FORMAT_NUMBER_00 =  '0.00'

[line 46]


[ Top ]

FORMAT_NUMBER_COMMA_SEPARATED1 =  '#,##0.00'

[line 47]


[ Top ]

FORMAT_NUMBER_COMMA_SEPARATED2 =  '#,##0.00_-'

[line 48]


[ Top ]

FORMAT_PERCENTAGE =  '0%'

[line 50]


[ Top ]

FORMAT_PERCENTAGE_00 =  '0.00%'

[line 51]


[ Top ]



Documentation generated on Mon, 05 Jan 2009 20:38:08 +0100 by phpDocumentor 1.4.1