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

PHPExcel_Style_NumberFormat




Tags:

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


[ Top ]


Class Variables

static $_builtInFormats =

[line 90]

Excel built-in number formats

Excel built-in number formats




Tags:

access:  private

Type:   array


[ Top ]

static $_flippedBuiltInFormats =

[line 97]

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

Built-in format Code

Built-in format Code




Tags:

access:  private

Type:   string


[ Top ]

$_formatCode =

[line 104]

Format Code

Format Code




Tags:

access:  private

Type:   string


[ Top ]

$_hashIndex =

[line 383]

Hash index

Hash index




Tags:

access:  private

Type:   string


[ Top ]

$_parent =

[line 119]

Parent Style

Parent Style




Tags:

access:  private

Type:   PHPExcel_Style


[ Top ]

$_parentPropertyName =

[line 126]

Parent Borders

Parent Borders




Tags:

var:  string
access:  private

Type:   _parentPropertyName


[ Top ]



Class Methods


static method builtInFormatCode [line 331]

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

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

static void fillBuiltInFormatCodes( )

Fill built-in format codes

Fill built-in format codes




Tags:

access:  private


[ Top ]

static method toFormattedString [line 430]

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

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

PHPExcel_Style_NumberFormat __construct( )

Create a new PHPExcel_Style_NumberFormat

Create a new PHPExcel_Style_NumberFormat




Tags:

access:  public


[ Top ]

method getBuiltInFormatCode [line 246]

int getBuiltInFormatCode( )

Get Built-In Format Code

Get Built-In Format Code




Tags:

access:  public


[ Top ]

method getFormatCode [line 220]

string getFormatCode( )

Get Format Code

Get Format Code




Tags:

access:  public


[ Top ]

method getHashCode [line 369]

string getHashCode( )

Get hash code

Get hash code




Tags:

return:  Hash code
access:  public


[ Top ]

method getHashIndex [line 393]

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

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

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

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 setBuiltInFormatCode [line 255]

void setBuiltInFormatCode( [int $pValue = 0])

Set Built-In Format Code

Set Built-In Format Code




Tags:

access:  public


Parameters:

int   $pValue  

[ Top ]

method setFormatCode [line 233]

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

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

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


[ Top ]

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

[line 82]


[ Top ]

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

[line 81]


[ Top ]

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

[line 70]


[ Top ]

FORMAT_DATE_DDMMYYYY =  'dd/mm/yy'

[line 60]


[ Top ]

FORMAT_DATE_DMMINUS =  'd-m'

[line 63]


[ Top ]

FORMAT_DATE_DMYMINUS =  'd-m-y'

[line 62]


[ Top ]

FORMAT_DATE_DMYSLASH =  'd/m/y'

[line 61]


[ Top ]

FORMAT_DATE_MYMINUS =  'm-y'

[line 64]


[ Top ]

FORMAT_DATE_TIME1 =  'h:mm AM/PM'

[line 71]


[ Top ]

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

[line 72]


[ Top ]

FORMAT_DATE_TIME3 =  'h:mm'

[line 73]


[ Top ]

FORMAT_DATE_TIME4 =  'h:mm:ss'

[line 74]


[ Top ]

FORMAT_DATE_TIME5 =  'mm:ss'

[line 75]


[ Top ]

FORMAT_DATE_TIME6 =  'h:mm:ss'

[line 76]


[ Top ]

FORMAT_DATE_TIME7 =  'i:s.S'

[line 77]


[ Top ]

FORMAT_DATE_TIME8 =  'h:mm:ss;@'

[line 78]


[ Top ]

FORMAT_DATE_XLSX14 =  'mm-dd-yy'

[line 65]


[ Top ]

FORMAT_DATE_XLSX15 =  'd-mmm-yy'

[line 66]


[ Top ]

FORMAT_DATE_XLSX16 =  'd-mmm'

[line 67]


[ Top ]

FORMAT_DATE_XLSX17 =  'mmm-yy'

[line 68]


[ Top ]

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

[line 69]


[ Top ]

FORMAT_DATE_YYYYMMDD =  'yy-mm-dd'

[line 59]


[ Top ]

FORMAT_DATE_YYYYMMDD2 =  'yyyy-mm-dd'

[line 58]


[ Top ]

FORMAT_DATE_YYYYMMDDSLASH =  'yy/mm/dd;@'

[line 79]


[ Top ]

FORMAT_GENERAL =  'General'

[line 46]


[ Top ]

FORMAT_NUMBER =  '0'

[line 50]


[ Top ]

FORMAT_NUMBER_00 =  '0.00'

[line 51]


[ Top ]

FORMAT_NUMBER_COMMA_SEPARATED1 =  '#,##0.00'

[line 52]


[ Top ]

FORMAT_NUMBER_COMMA_SEPARATED2 =  '#,##0.00_-'

[line 53]


[ Top ]

FORMAT_PERCENTAGE =  '0%'

[line 55]


[ Top ]

FORMAT_PERCENTAGE_00 =  '0.00%'

[line 56]


[ Top ]

FORMAT_TEXT =  '@'

[line 48]


[ Top ]



Documentation generated on Wed, 22 Apr 2009 09:00:49 +0200 by phpDocumentor 1.4.1