REFHELPER_REGEXP_CELLREF
REFHELPER_REGEXP_CELLREF = '((\w*|\'[^!]*\')!)?(?<![:a-z\$])(\$?[a-z]{1,3}\$?\d+)(?=[^:!\d\'])'
Regular Expressions
PHPExcel_ReferenceHelper (Singleton)
Copyright (c) 2006 - 2015 PHPExcel
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
$instance : \PHPExcel_ReferenceHelper
Instance of this class
getInstance() : \PHPExcel_ReferenceHelper
Get an instance of this class
insertNewBefore(string $pBefore = 'A1', integer $pNumCols, integer $pNumRows, \PHPExcel_Worksheet $pSheet = null)
Insert a new column or row, updating all possible related data
string | $pBefore | Insert before this cell address (e.g. 'A1') |
integer | $pNumCols | Number of columns to insert/delete (negative values indicate deletion) |
integer | $pNumRows | Number of rows to insert/delete (negative values indicate deletion) |
\PHPExcel_Worksheet | $pSheet | The worksheet that we're editing |
updateFormulaReferences(string $pFormula = '', integer $pBefore = 'A1', integer $pNumCols, integer $pNumRows, string $sheetName = '') : string
Update references within formulas
string | $pFormula | Formula to update |
integer | $pBefore | Insert before this one |
integer | $pNumCols | Number of columns to insert |
integer | $pNumRows | Number of rows to insert |
string | $sheetName | Worksheet name/title |
Updated formula
updateCellReference(string $pCellRange = 'A1', integer $pBefore = 'A1', integer $pNumCols, integer $pNumRows) : string
Update cell reference
string | $pCellRange | Cell range |
integer | $pBefore | Insert before this one |
integer | $pNumCols | Number of columns to increment |
integer | $pNumRows | Number of rows to increment |
Updated cell range
updateNamedFormulas(\PHPExcel $pPhpExcel, string $oldName = '', string $newName = '')
Update named formulas (i.e. containing worksheet references / named ranges)
\PHPExcel | $pPhpExcel | Object to update |
string | $oldName | Old name (name to replace) |
string | $newName | New name |
adjustPageBreaks(\PHPExcel_Worksheet $pSheet, string $pBefore, integer $beforeColumnIndex, integer $pNumCols, integer $beforeRow, integer $pNumRows)
Update page breaks when inserting/deleting rows/columns
\PHPExcel_Worksheet | $pSheet | The worksheet that we're editing |
string | $pBefore | Insert/Delete before this cell address (e.g. 'A1') |
integer | $beforeColumnIndex | Index number of the column we're inserting/deleting before |
integer | $pNumCols | Number of columns to insert/delete (negative values indicate deletion) |
integer | $beforeRow | Number of the row we're inserting/deleting before |
integer | $pNumRows | Number of rows to insert/delete (negative values indicate deletion) |
adjustComments(\PHPExcel_Worksheet $pSheet, string $pBefore, integer $beforeColumnIndex, integer $pNumCols, integer $beforeRow, integer $pNumRows)
Update cell comments when inserting/deleting rows/columns
\PHPExcel_Worksheet | $pSheet | The worksheet that we're editing |
string | $pBefore | Insert/Delete before this cell address (e.g. 'A1') |
integer | $beforeColumnIndex | Index number of the column we're inserting/deleting before |
integer | $pNumCols | Number of columns to insert/delete (negative values indicate deletion) |
integer | $beforeRow | Number of the row we're inserting/deleting before |
integer | $pNumRows | Number of rows to insert/delete (negative values indicate deletion) |
adjustHyperlinks(\PHPExcel_Worksheet $pSheet, string $pBefore, integer $beforeColumnIndex, integer $pNumCols, integer $beforeRow, integer $pNumRows)
Update hyperlinks when inserting/deleting rows/columns
\PHPExcel_Worksheet | $pSheet | The worksheet that we're editing |
string | $pBefore | Insert/Delete before this cell address (e.g. 'A1') |
integer | $beforeColumnIndex | Index number of the column we're inserting/deleting before |
integer | $pNumCols | Number of columns to insert/delete (negative values indicate deletion) |
integer | $beforeRow | Number of the row we're inserting/deleting before |
integer | $pNumRows | Number of rows to insert/delete (negative values indicate deletion) |
adjustDataValidations(\PHPExcel_Worksheet $pSheet, string $pBefore, integer $beforeColumnIndex, integer $pNumCols, integer $beforeRow, integer $pNumRows)
Update data validations when inserting/deleting rows/columns
\PHPExcel_Worksheet | $pSheet | The worksheet that we're editing |
string | $pBefore | Insert/Delete before this cell address (e.g. 'A1') |
integer | $beforeColumnIndex | Index number of the column we're inserting/deleting before |
integer | $pNumCols | Number of columns to insert/delete (negative values indicate deletion) |
integer | $beforeRow | Number of the row we're inserting/deleting before |
integer | $pNumRows | Number of rows to insert/delete (negative values indicate deletion) |
adjustMergeCells(\PHPExcel_Worksheet $pSheet, string $pBefore, integer $beforeColumnIndex, integer $pNumCols, integer $beforeRow, integer $pNumRows)
Update merged cells when inserting/deleting rows/columns
\PHPExcel_Worksheet | $pSheet | The worksheet that we're editing |
string | $pBefore | Insert/Delete before this cell address (e.g. 'A1') |
integer | $beforeColumnIndex | Index number of the column we're inserting/deleting before |
integer | $pNumCols | Number of columns to insert/delete (negative values indicate deletion) |
integer | $beforeRow | Number of the row we're inserting/deleting before |
integer | $pNumRows | Number of rows to insert/delete (negative values indicate deletion) |
adjustProtectedCells(\PHPExcel_Worksheet $pSheet, string $pBefore, integer $beforeColumnIndex, integer $pNumCols, integer $beforeRow, integer $pNumRows)
Update protected cells when inserting/deleting rows/columns
\PHPExcel_Worksheet | $pSheet | The worksheet that we're editing |
string | $pBefore | Insert/Delete before this cell address (e.g. 'A1') |
integer | $beforeColumnIndex | Index number of the column we're inserting/deleting before |
integer | $pNumCols | Number of columns to insert/delete (negative values indicate deletion) |
integer | $beforeRow | Number of the row we're inserting/deleting before |
integer | $pNumRows | Number of rows to insert/delete (negative values indicate deletion) |
adjustColumnDimensions(\PHPExcel_Worksheet $pSheet, string $pBefore, integer $beforeColumnIndex, integer $pNumCols, integer $beforeRow, integer $pNumRows)
Update column dimensions when inserting/deleting rows/columns
\PHPExcel_Worksheet | $pSheet | The worksheet that we're editing |
string | $pBefore | Insert/Delete before this cell address (e.g. 'A1') |
integer | $beforeColumnIndex | Index number of the column we're inserting/deleting before |
integer | $pNumCols | Number of columns to insert/delete (negative values indicate deletion) |
integer | $beforeRow | Number of the row we're inserting/deleting before |
integer | $pNumRows | Number of rows to insert/delete (negative values indicate deletion) |
adjustRowDimensions(\PHPExcel_Worksheet $pSheet, string $pBefore, integer $beforeColumnIndex, integer $pNumCols, integer $beforeRow, integer $pNumRows)
Update row dimensions when inserting/deleting rows/columns
\PHPExcel_Worksheet | $pSheet | The worksheet that we're editing |
string | $pBefore | Insert/Delete before this cell address (e.g. 'A1') |
integer | $beforeColumnIndex | Index number of the column we're inserting/deleting before |
integer | $pNumCols | Number of columns to insert/delete (negative values indicate deletion) |
integer | $beforeRow | Number of the row we're inserting/deleting before |
integer | $pNumRows | Number of rows to insert/delete (negative values indicate deletion) |
cellAddressInDeleteRange(string $cellAddress, integer $beforeRow, integer $pNumRows, integer $beforeColumnIndex, integer $pNumCols) : boolean
Test whether a cell address falls within a defined range of cells
string | $cellAddress | Address of the cell we're testing |
integer | $beforeRow | Number of the row we're inserting/deleting before |
integer | $pNumRows | Number of rows to insert/delete (negative values indicate deletion) |
integer | $beforeColumnIndex | Index number of the column we're inserting/deleting before |
integer | $pNumCols | Number of columns to insert/delete (negative values indicate deletion) |
updateCellRange(string $pCellRange = 'A1:A1', integer $pBefore = 'A1', integer $pNumCols, integer $pNumRows) : string
Update cell range
string | $pCellRange | Cell range (e.g. 'B2:D4', 'B:C' or '2:3') |
integer | $pBefore | Insert before this one |
integer | $pNumCols | Number of columns to increment |
integer | $pNumRows | Number of rows to increment |
Updated cell range
updateSingleCellReference(string $pCellReference = 'A1', integer $pBefore = 'A1', integer $pNumCols, integer $pNumRows) : string
Update single cell reference
string | $pCellReference | Single cell reference |
integer | $pBefore | Insert before this one |
integer | $pNumCols | Number of columns to increment |
integer | $pNumRows | Number of rows to increment |
Updated cell reference