Overview

Packages

  • JAMA
  • None
  • PHP
  • PHPExcel
    • CachedObjectStorage
    • Calculation
    • Cell
    • Chart
      • Renderer
    • Reader
      • Excel2007
      • Excel5
    • RichText
    • Settings
    • Shared
      • Escher
      • OLE
      • Trend
      • ZipArchive
    • Style
    • Worksheet
      • Drawing
    • Writer
      • 2007
      • CSV
      • Excel2007
      • Excel5
      • HTML
      • PDF

Classes

  • PHPExcel_Cell
  • PHPExcel_Cell_AdvancedValueBinder
  • PHPExcel_Cell_DataType
  • PHPExcel_Cell_DataValidation
  • PHPExcel_Cell_DefaultValueBinder
  • PHPExcel_Cell_Hyperlink

Interfaces

  • PHPExcel_Cell_IValueBinder
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Class PHPExcel_Cell

PHPExcel_Cell

Package: PHPExcel\Cell
Category: PHPExcel
Copyright: Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
License: LGPL
Located at controlador/include/phpexcel/PHPExcel/Cell.php
Methods summary
public
# notifyCacheController( )

Send notification to the cache controller

Send notification to the cache controller

public
# detach( )
public
# attach( PHPExcel_CachedObjectStorage_CacheBase $parent )
public
# __construct( mixed $pValue = NULL, string $pDataType = NULL, PHPExcel_Worksheet $pSheet = NULL )

Create a new Cell

Create a new Cell

Parameters

$pValue
$pDataType
$pSheet

Throws

PHPExcel_Exception
public string
# getColumn( )

Get cell coordinate column

Get cell coordinate column

Returns

string
public integer
# getRow( )

Get cell coordinate row

Get cell coordinate row

Returns

integer
public string
# getCoordinate( )

Get cell coordinate

Get cell coordinate

Returns

string
public mixed
# getValue( )

Get cell value

Get cell value

Returns

mixed
public string
# getFormattedValue( )

Get cell value with formatting

Get cell value with formatting

Returns

string
public PHPExcel_Cell
# setValue( mixed $pValue = NULL )

Set cell value

Set cell value

Sets the value for a cell, automatically determining the datatype using the value binder

Parameters

$pValue
Value

Returns

PHPExcel_Cell

Throws

PHPExcel_Exception
public PHPExcel_Cell
# setValueExplicit( mixed $pValue = NULL, string $pDataType = PHPExcel_Cell_DataType::TYPE_STRING )

Set the value for a cell, with the explicit data type passed to the method (bypassing any use of the value binder)

Set the value for a cell, with the explicit data type passed to the method (bypassing any use of the value binder)

Parameters

$pValue
Value
$pDataType
Explicit data type

Returns

PHPExcel_Cell

Throws

PHPExcel_Exception
public mixed
# getCalculatedValue( boolean $resetLog = TRUE )

Get calculated cell value

Get calculated cell value

Deprecated

Since version 1.7.8 for planned changes to cell for array formula handling

Parameters

$resetLog
Whether the calculation engine logger should be reset or not

Returns

mixed

Throws

PHPExcel_Exception
public PHPExcel_Cell
# setCalculatedValue( mixed $pValue = NULL )

Set old calculated value (cached)

Set old calculated value (cached)

Parameters

$pValue
Value

Returns

PHPExcel_Cell
public mixed
# getOldCalculatedValue( )

Get old calculated value (cached) This returns the value last calculated by MS Excel or whichever spreadsheet program was used to create the original spreadsheet file. Note that this value is not guaranteed to refelect the actual calculated value because it is possible that auto-calculation was disabled in the original spreadsheet, and underlying data values used by the formula have changed since it was last calculated.

Get old calculated value (cached) This returns the value last calculated by MS Excel or whichever spreadsheet program was used to create the original spreadsheet file. Note that this value is not guaranteed to refelect the actual calculated value because it is possible that auto-calculation was disabled in the original spreadsheet, and underlying data values used by the formula have changed since it was last calculated.

Returns

mixed
public string
# getDataType( )

Get cell data type

Get cell data type

Returns

string
public PHPExcel_Cell
# setDataType( string $pDataType = PHPExcel_Cell_DataType::TYPE_STRING )

Set cell data type

Set cell data type

Parameters

$pDataType

Returns

PHPExcel_Cell
public boolean
# isFormula( )

Identify if the cell contains a formula

Identify if the cell contains a formula

Returns

boolean
public boolean
# hasDataValidation( )

Does this cell contain Data validation rules?

Does this cell contain Data validation rules?

Returns

boolean

Throws

PHPExcel_Exception
public PHPExcel_Cell_DataValidation
# getDataValidation( )

Get Data validation rules

Get Data validation rules

Returns

PHPExcel_Cell_DataValidation

Throws

PHPExcel_Exception
public PHPExcel_Cell
# setDataValidation( PHPExcel_Cell_DataValidation $pDataValidation = NULL )

Set Data validation rules

Set Data validation rules

Parameters

$pDataValidation

Returns

PHPExcel_Cell

Throws

PHPExcel_Exception
public boolean
# hasHyperlink( )

Does this cell contain a Hyperlink?

Does this cell contain a Hyperlink?

Returns

boolean

Throws

PHPExcel_Exception
public PHPExcel_Cell_Hyperlink
# getHyperlink( )

Get Hyperlink

Get Hyperlink

Returns

PHPExcel_Cell_Hyperlink

Throws

PHPExcel_Exception
public PHPExcel_Cell
# setHyperlink( PHPExcel_Cell_Hyperlink $pHyperlink = NULL )

Set Hyperlink

Set Hyperlink

Parameters

$pHyperlink

Returns

PHPExcel_Cell

Throws

PHPExcel_Exception
public PHPExcel_CachedObjectStorage_CacheBase
# getParent( )

Get parent worksheet

Get parent worksheet

Returns

PHPExcel_CachedObjectStorage_CacheBase
public PHPExcel_Worksheet
# getWorksheet( )

Get parent worksheet

Get parent worksheet

Returns

PHPExcel_Worksheet
public PHPExcel_Style
# getStyle( )

Get cell style

Get cell style

Returns

PHPExcel_Style
public PHPExcel_Cell
# rebindParent( PHPExcel_Worksheet $parent )

Re-bind parent

Re-bind parent

Parameters

$parent

Returns

PHPExcel_Cell
public boolean
# isInRange( string $pRange = 'A1:A1' )

Is cell in a specific range?

Is cell in a specific range?

Parameters

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

Returns

boolean
public static array
# coordinateFromString( string $pCoordinateString = 'A1' )

Coordinate from string

Coordinate from string

Parameters

$pCoordinateString

Returns

array
Array containing column and row (indexes 0 and 1)

Throws

PHPExcel_Exception
public static string
# absoluteReference( string $pCoordinateString = 'A1' )

Make string row, column or cell coordinate absolute

Make string row, column or cell coordinate absolute

Parameters

$pCoordinateString

e.g. 'A' or '1' or 'A1' Note that this value can be a row or column reference as well as a cell reference

Returns

string
Absolute coordinate e.g. '$A' or '$1' or '$A$1'

Throws

PHPExcel_Exception
public static string
# absoluteCoordinate( string $pCoordinateString = 'A1' )

Make string coordinate absolute

Make string coordinate absolute

Parameters

$pCoordinateString
e.g. 'A1'

Returns

string
Absolute coordinate e.g. '$A$1'

Throws

PHPExcel_Exception
public static array
# splitRange( string $pRange = 'A1:A1' )

Split range into coordinate strings

Split range into coordinate strings

Parameters

$pRange
e.g. 'B4:D9' or 'B4:D9,H2:O11' or 'B4'

Returns

array

Array containg one or more arrays containing one or two coordinate strings e.g. array('B4','D9') or array(array('B4','D9'),array('H2','O11')) or array('B4')

public static string
# buildRange( array $pRange )

Build range from coordinate strings

Build range from coordinate strings

Parameters

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

Returns

string
String representation of $pRange

Throws

PHPExcel_Exception
public static array
# rangeBoundaries( string $pRange = 'A1:A1' )

Calculate range boundaries

Calculate range boundaries

Parameters

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

Returns

array

Range coordinates array(Start Cell, End Cell) where Start Cell and End Cell are arrays (Column Number, Row Number)

public static array
# rangeDimension( string $pRange = 'A1:A1' )

Calculate range dimension

Calculate range dimension

Parameters

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

Returns

array
Range dimension (width, height)
public static array
# getRangeBoundaries( string $pRange = 'A1:A1' )

Calculate range boundaries

Calculate range boundaries

Parameters

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

Returns

array

Range coordinates array(Start Cell, End Cell) where Start Cell and End Cell are arrays (Column ID, Row Number)

public static integer
# columnIndexFromString( string $pString = 'A' )

Column index from string

Column index from string

Parameters

$pString

Returns

integer
Column index (base 1 !!!)
public static string
# stringFromColumnIndex( integer $pColumnIndex = 0 )

String from columnindex

String from columnindex

Parameters

$pColumnIndex
Column index (base 0 !!!)

Returns

string
public static array
# extractAllCellReferencesInRange( string $pRange = 'A1' )

Extract all cell references in range

Extract all cell references in range

Parameters

$pRange
Range (e.g. A1 or A1:C10 or A1:E10 A20:E25)

Returns

array
Array containing single cell references
public static integer
# compareCells( PHPExcel_Cell $a, PHPExcel_Cell $b )

Compare 2 cells

Compare 2 cells

Parameters

$a
Cell a
$b
Cell b

Returns

integer
Result of comparison (always -1 or 1, never zero!)
public static PHPExcel_Cell_IValueBinder
# getValueBinder( )

Get value binder to use

Get value binder to use

Returns

PHPExcel_Cell_IValueBinder
public static
# setValueBinder( PHPExcel_Cell_IValueBinder $binder = NULL )

Set value binder to use

Set value binder to use

Parameters

$binder

Throws

PHPExcel_Exception
public
# __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.

public integer
# getXfIndex( )

Get index to cellXf

Get index to cellXf

Returns

integer
public PHPExcel_Cell
# setXfIndex( integer $pValue = 0 )

Set index to cellXf

Set index to cellXf

Parameters

$pValue

Returns

PHPExcel_Cell
public
# setFormulaAttributes( $pAttributes )

Deprecated

Since version 1.7.8 for planned changes to cell for array formula handling
public
# getFormulaAttributes( )

Deprecated

Since version 1.7.8 for planned changes to cell for array formula handling
public string
# __toString( )

Convert to string

Convert to string

Returns

string
Constants summary
string DEFAULT_RANGE

Default range variable constant

Default range variable constant

# 'A1:A1'
Properties summary
private static PHPExcel_Cell_IValueBinder $_valueBinder

Value binder to use

Value binder to use

# NULL
private mixed $_value

Value of the cell

Value of the cell

#
private mixed $_calculatedValue

Calculated value of the cell (used for caching) This returns the value last calculated by MS Excel or whichever spreadsheet program was used to create the original spreadsheet file. Note that this value is not guaranteed to reflect the actual calculated value because it is possible that auto-calculation was disabled in the original spreadsheet, and underlying data values used by the formula have changed since it was last calculated.

Calculated value of the cell (used for caching) This returns the value last calculated by MS Excel or whichever spreadsheet program was used to create the original spreadsheet file. Note that this value is not guaranteed to reflect the actual calculated value because it is possible that auto-calculation was disabled in the original spreadsheet, and underlying data values used by the formula have changed since it was last calculated.

# NULL
private string $_dataType

Type of the cell data

Type of the cell data

#
private PHPExcel_CachedObjectStorage_CacheBase $_parent

Parent worksheet

Parent worksheet

#
private integer $_xfIndex

Index to cellXf

Index to cellXf

#
private $_formulaAttributes

Attributes of the formula

Attributes of the formula

#
Autene API documentation generated by ApiGen