Docs For Class PHPExcel_Cell

PHPExcel_Cell

# Class: PHPExcel_Cell

Source Location: /PHPExcel/Cell.php

### Class Overview

PHPExcel_Cell

#### Author(s):

#### Copyright:

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

### Methods

- __construct
- absoluteCoordinate
- absoluteReference
- attach
- buildRange
- columnIndexFromString
- compareCells
- coordinateFromString
- detach
- extractAllCellReferencesInRange
- getCalculatedValue
- getColumn
- getCoordinate
- getDataType
- getDataValidation
- getFormattedValue
- getFormulaAttributes
- getHyperlink
- getOldCalculatedValue
- getParent
- getRangeBoundaries
- getRow
- getValue
- getValueBinder
- getXfIndex
- hasDataValidation
- hasHyperlink
- isInRange
- notifyCacheController
- rangeBoundaries
- rangeDimension
- rebindParent
- setCalculatedValue
- setDataType
- setDataValidation
- setFormulaAttributes
- setHyperlink
- setValue
- setValueBinder
- setValueExplicit
- setXfIndex
- splitRange
- stringFromColumnIndex
- __clone

### Class Details

[line 36]
PHPExcel_Cell

#### Tags:

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

[ Top ]

### Class Methods

### static method absoluteCoordinate [line 541]

`static string absoluteCoordinate( [string $pCoordinateString = 'A1'])`

Make string coordinate absolute

#### Tags:

return: | Absolute coordinate e.g. '$A$1'
throws: | Exception
access: | public

#### Parameters:

string | $pCoordinateString | e.g. 'A1'

[ Top ]

### static method absoluteReference [line 519]

`static string absoluteReference( [string $pCoordinateString = 'A1'])`

Make string row, column or cell coordinate absolute

#### Tags:

return: | Absolute coordinate e.g. '$A' or '$1' or '$A$1'
throws: | Exception
access: | public

#### Parameters:

string | $pCoordinateString | e.g. 'A' or '1' or 'A1'

[ Top ]

### static method buildRange [line 577]

`static string buildRange( array $pRange)`

Build range from coordinate strings

#### Tags:

return: | String representation of $pRange
throws: | Exception
access: | public

#### Parameters:

array | $pRange | Array containg one or more arrays containing one or two coordinate strings

[ Top ]

### static method columnIndexFromString [line 666]

`static int columnIndexFromString( [string $pString = 'A'])`

Column index from string

#### Tags:

return: | Column index (base 1 !!!)
throws: | Exception
access: | public

#### Parameters:

string | $pString |

[ Top ]

### static method compareCells [line 770]

`static int compareCells( PHPExcel_Cell $a, PHPExcel_Cell $b)`

Compare 2 cells

#### Tags:

return: | Result of comparison (always -1 or 1, never zero!)
access: | public

#### Parameters:

PHPExcel_Cell | $a | Cell b
PHPExcel_Cell | $b |

[ Top ]

### static method coordinateFromString [line 499]

`static array coordinateFromString( [string $pCoordinateString = 'A1'])`

Coordinate from string

#### Tags:

return: | Array containing column and row (indexes 0 and 1)
throws: | Exception
access: | public

#### Parameters:

string | $pCoordinateString |

[ Top ]

### static method extractAllCellReferencesInRange [line 715]

`static array extractAllCellReferencesInRange( [string $pRange = 'A1'])`

Extract all cell references in range

#### Tags:

return: | Array containing single cell references
access: | public

#### Parameters:

string | $pRange | Range (e.g. A1 or A1:A10 or A1:A10 A100:A1000)

[ Top ]

### static method getRangeBoundaries [line 644]

`static array getRangeBoundaries( [string $pRange = 'A1:A1'])`

Calculate range boundaries

#### Tags:

return: | Range boundaries (staring Column, starting Row, Final Column, Final Row)
access: | public

#### Parameters:

string | $pRange | Cell range (e.g. A1:A1)

[ Top ]

### static method getValueBinder [line 788]

`static PHPExcel_Cell_IValueBinder getValueBinder( )`

Get value binder to use

#### Tags:

access: | public

[ Top ]

### static method rangeBoundaries [line 601]

`static array rangeBoundaries( [string $pRange = 'A1:A1'])`

Calculate range boundaries

#### Tags:

return: | Range coordinates (Start Cell, End Cell) where Start Cell and End Cell are arrays (Column Number, Row Number)
access: | public

#### Parameters:

string | $pRange | Cell range (e.g. A1:A1)

[ Top ]

### static method rangeDimension [line 630]

`static array rangeDimension( [string $pRange = 'A1:A1'])`

Calculate range dimension

#### Tags:

return: | Range dimension (width, height)
access: | public

#### Parameters:

string | $pRange | Cell range (e.g. A1:A1)

[ Top ]

### static method setValueBinder [line 802]

`static void setValueBinder( [PHPExcel_Cell_IValueBinder $binder = null])`

Set value binder to use

#### Tags:

throws: | Exception
access: | public

#### Parameters:

PHPExcel_Cell_IValueBinder | $binder |

[ Top ]

### static method splitRange [line 560]

`static array splitRange( [string $pRange = 'A1:A1'])`

Split range into coordinate strings

#### Tags:

return: | Array containg one or more arrays containing one or two coordinate strings
access: | public

#### Parameters:

string | $pRange |

[ Top ]

### static method stringFromColumnIndex [line 698]

`static string stringFromColumnIndex( [int $pColumnIndex = 0])`

String from columnindex

#### Tags:

access: | public

#### Parameters:

int | $pColumnIndex | Column index (base 0 !!!)

[ Top ]

### constructor __construct [line 130]

`PHPExcel_Cell __construct( [string $pColumn = 'A'], [int $pRow = 1], [mixed $pValue = null], [string $pDataType = null], [ $pSheet = null])`

Create a new Cell

#### Tags:

throws: | Exception
access: | public

#### Parameters:

string | $pColumn |
int | $pRow |
mixed | $pValue |
string | $pDataType |
PHPExcel_Worksheet | $pSheet |

[ Top ]

### method attach [line 115]

`void attach( $parent)`

#### Tags:

access: | public

#### Parameters:

| $parent |

[ Top ]

### method detach [line 111]

`void detach( )`

#### Tags:

access: | public

[ Top ]

### method getCalculatedValue [line 277]

`mixed getCalculatedValue( [ $resetLog = true])`

Get calculated cell value

#### Tags:

access: | public

#### Parameters:

| $resetLog |

[ Top ]

### method getColumn [line 162]

`string getColumn( )`

Get cell coordinate column

#### Tags:

access: | public

[ Top ]

### method getCoordinate [line 182]

`string getCoordinate( )`

Get cell coordinate

#### Tags:

access: | public

[ Top ]

### method getDataType [line 337]

`string getDataType( )`

Get cell data type

#### Tags:

access: | public

[ Top ]

### method getDataValidation [line 377]

`PHPExcel_Cell_DataValidation getDataValidation( )`

Get Data validation

#### Tags:

access: | public

[ Top ]

### method getFormattedValue [line 202]

`string getFormattedValue( )`

Get cell value with formatting

#### Tags:

access: | public

[ Top ]

### method getFormulaAttributes [line 854]

`void getFormulaAttributes( )`

#### Tags:

access: | public

[ Top ]

### method getHyperlink [line 424]

`PHPExcel_Cell_Hyperlink getHyperlink( )`

Get Hyperlink

#### Tags:

throws: | Exception
access: | public

[ Top ]

### method getOldCalculatedValue [line 327]

`mixed getOldCalculatedValue( )`

Get old calculated value (cached)

#### Tags:

access: | public

[ Top ]

### method getParent [line 456]

`PHPExcel_Worksheet getParent( )`

Get parent

#### Tags:

access: | public

[ Top ]

### method getRow [line 172]

`int getRow( )`

Get cell coordinate row

#### Tags:

access: | public

[ Top ]

### method getValue [line 192]

`mixed getValue( )`

Get cell value

#### Tags:

access: | public

[ Top ]

### method getXfIndex [line 829]

`int getXfIndex( )`

Get index to cellXf

#### Tags:

access: | public

[ Top ]

### method hasDataValidation [line 363]

`boolean hasDataValidation( )`

Has Data validation?

#### Tags:

access: | public

[ Top ]

### method hasHyperlink [line 409]

`boolean hasHyperlink( )`

Has Hyperlink

#### Tags:

access: | public

[ Top ]

### method isInRange [line 478]

`boolean isInRange( [string $pRange = 'A1:A1'])`

Is cell in a specific range?

#### Tags:

access: | public

#### Parameters:

string | $pRange | Cell range (e.g. A1:A1)

[ Top ]

### method notifyCacheController [line 106]

`void notifyCacheController( )`

Send notification to the cache controller

#### Tags:

access: | public

[ Top ]

### method rebindParent [line 466]

`PHPExcel_Cell rebindParent( $parent)`

Re-bind parent

#### Tags:

access: | public

#### Parameters:

PHPExcel_Worksheet | $parent |

[ Top ]

### method setCalculatedValue [line 313]

`PHPExcel_Cell setCalculatedValue( [mixed $pValue = null])`

Set calculated value (used for caching)

#### Tags:

access: | public

#### Parameters:

mixed | $pValue | Value

[ Top ]

### method setDataType [line 348]

`PHPExcel_Cell setDataType( [string $pDataType = PHPExcel_Cell_DataType::TYPE_STRING])`

Set cell data type

#### Tags:

access: | public

#### Parameters:

string | $pDataType |

[ Top ]

### method setDataValidation [line 393]

`PHPExcel_Cell setDataValidation( [PHPExcel_Cell_DataValidation $pDataValidation = null])`

Set Data validation

#### Tags:

throws: | Exception
access: | public

#### Parameters:

PHPExcel_Cell_DataValidation | $pDataValidation |

[ Top ]

### method setFormulaAttributes [line 848]

`void setFormulaAttributes( $pAttributes)`

#### Tags:

access: | public

#### Parameters:

| $pAttributes |

[ Top ]

### method setHyperlink [line 440]

`PHPExcel_Cell setHyperlink( [PHPExcel_Cell_Hyperlink $pHyperlink = null])`

Set Hyperlink

#### Tags:

throws: | Exception
access: | public

#### Parameters:

PHPExcel_Cell_Hyperlink | $pHyperlink |

[ Top ]

### method setValue [line 217]

`PHPExcel_Cell setValue( [mixed $pValue = null])`

Set cell value

This clears the cell formula.

#### Tags:

access: | public

#### Parameters:

mixed | $pValue | Value

[ Top ]

### method setValueExplicit [line 233]

`PHPExcel_Cell setValueExplicit( [mixed $pValue = null], [string $pDataType = PHPExcel_Cell_DataType::TYPE_STRING])`

Set cell value (with explicit data type given)

#### Tags:

throws: | Exception
access: | public

#### Parameters:

mixed | $pValue | Value
string | $pDataType | Explicit data type

[ Top ]

### method setXfIndex [line 840]

`PHPExcel_Cell setXfIndex( [int $pValue = 0])`

Set index to cellXf

#### Tags:

access: | public

#### Parameters:

int | $pValue |

[ Top ]

### method __clone [line 813]

`void __clone( )`

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

#### Tags:

access: | public

[ Top ]

Documentation generated on Sun, 27 Feb 2011 16:28:58 -0800 by phpDocumentor 1.4.3