Docs For Class PHPExcel_ReferenceHelper

PHPExcel

# Class: PHPExcel_ReferenceHelper

Source Location: /PHPExcel/ReferenceHelper.php

### Class Overview

PHPExcel_ReferenceHelper (Singleton)

#### Author(s):

#### Copyright:

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

### Constants

- REFHELPER_REGEXP_CELLRANGE
- REFHELPER_REGEXP_CELLREF
- REFHELPER_REGEXP_COLRANGE
- REFHELPER_REGEXP_ROWRANGE

### Methods

- __construct
- getInstance
- insertNewBefore
- updateCellReference
- updateFormulaReferences
- updateNamedFormulas
- __clone

### Class Details

[line 36]
PHPExcel_ReferenceHelper (Singleton)

#### Tags:

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

[ Top ]

### Class Methods

### static method getInstance [line 57]

`static PHPExcel_ReferenceHelper getInstance( )`

Get an instance of this class

#### Tags:

access: | public

[ Top ]

### constructor __construct [line 68]

`PHPExcel_ReferenceHelper __construct( )`

Create a new PHPExcel_ReferenceHelper

#### Tags:

access: | protected

[ Top ]

### method insertNewBefore [line 79]

`void insertNewBefore( [int $pBefore = 'A1'], [int $pNumCols = 0], [int $pNumRows = 0], [ $pSheet = null])`

Insert a new column, updating all possible related data

#### Tags:

throws: | Exception
access: | public

#### Parameters:

int | $pBefore | Insert before this one
int | $pNumCols | Number of columns to insert
int | $pNumRows | Number of rows to insert
PHPExcel_Worksheet | $pSheet |

[ Top ]

### method updateCellReference [line 501]

`string updateCellReference( [string $pCellRange = 'A1'], [int $pBefore = 'A1'], [int $pNumCols = 0], [int $pNumRows = 0])`

Update cell reference

#### Tags:

return: | Updated cell range
throws: | Exception
access: | public

#### Parameters:

string | $pCellRange | Cell range
int | $pBefore | Insert before this one
int | $pNumCols | Number of columns to increment
int | $pNumRows | Number of rows to increment

[ Top ]

### method updateFormulaReferences [line 367]

`string updateFormulaReferences( [string $pFormula = ''], [int $pBefore = 'A1'], [int $pNumCols = 0], [int $pNumRows = 0], [ $sheetName = ''])`

Update references within formulas

#### Tags:

return: | Updated formula
throws: | Exception
access: | public

#### Parameters:

string | $pFormula | Formula to update
int | $pBefore | Insert before this one
int | $pNumCols | Number of columns to insert
int | $pNumRows | Number of rows to insert
| $sheetName |

[ Top ]

### method updateNamedFormulas [line 525]

`void updateNamedFormulas( PHPExcel $pPhpExcel, [string $oldName = ''], [string $newName = ''])`

Update named formulas (i.e. containing worksheet references / named ranges)

#### Tags:

access: | public

#### Parameters:

PHPExcel | $pPhpExcel | Object to update
string | $oldName | Old name (name to replace)
string | $newName | New name

[ Top ]

### method __clone [line 629]

`void __clone( )`

__clone implementation. Cloning should not be allowed in a Singleton!

#### Tags:

throws: | Exception
access: | public

[ Top ]

### Class Constants

#### REFHELPER_REGEXP_CELLRANGE = '((\w*|\'[^!]*\')!)?(\$?[a-z]{1,3}\$?\d+):(\$?[a-z]{1,3}\$?\d+)'

[line 41]

[ Top ]

#### REFHELPER_REGEXP_CELLREF = '((\w*|\'[^!]*\')!)?(?<![:a-z\$])(\$?[a-z]{1,3}\$?\d+)(?=[^:!\d\'])'

[line 40]

Regular Expressions
[ Top ]

#### REFHELPER_REGEXP_COLRANGE = '((\w*|\'[^!]*\')!)?(\$?[a-z]{1,3}):(\$?[a-z]{1,3})'

[line 43]

[ Top ]

#### REFHELPER_REGEXP_ROWRANGE = '((\w*|\'[^!]*\')!)?(\$?\d+):(\$?\d+)'

[line 42]

[ Top ]

Documentation generated on Sun, 27 Feb 2011 16:33:41 -0800 by phpDocumentor 1.4.3