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
  • PHPExcel_Autoloader
  • PHPExcel_Comment
  • PHPExcel_DocumentProperties
  • PHPExcel_DocumentSecurity
  • PHPExcel_HashTable
  • PHPExcel_IOFactory
  • PHPExcel_NamedRange
  • PHPExcel_ReferenceHelper
  • PHPExcel_WorksheetIterator

Interfaces

  • PHPExcel_IComparable

Exceptions

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

Class PHPExcel_ReferenceHelper

PHPExcel_ReferenceHelper (Singleton)

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

Get an instance of this class

Get an instance of this class

Returns

PHPExcel_ReferenceHelper
protected
# __construct( )

Create a new PHPExcel_ReferenceHelper

Create a new PHPExcel_ReferenceHelper

public static integer
# columnSort( string $a, string $b )

Compare two column addresses Intended for use as a Callback function for sorting column addresses by column

Compare two column addresses Intended for use as a Callback function for sorting column addresses by column

Parameters

$a
First column to test (e.g. 'AA')
$b
Second column to test (e.g. 'Z')

Returns

integer
public static integer
# columnReverseSort( string $a, string $b )

Compare two column addresses Intended for use as a Callback function for reverse sorting column addresses by column

Compare two column addresses Intended for use as a Callback function for reverse sorting column addresses by column

Parameters

$a
First column to test (e.g. 'AA')
$b
Second column to test (e.g. 'Z')

Returns

integer
public static integer
# cellSort( string $a, string $b )

Compare two cell addresses Intended for use as a Callback function for sorting cell addresses by column and row

Compare two cell addresses Intended for use as a Callback function for sorting cell addresses by column and row

Parameters

$a
First cell to test (e.g. 'AA1')
$b
Second cell to test (e.g. 'Z1')

Returns

integer
public static integer
# cellReverseSort( string $a, string $b )

Compare two cell addresses Intended for use as a Callback function for sorting cell addresses by column and row

Compare two cell addresses Intended for use as a Callback function for sorting cell addresses by column and row

Parameters

$a
First cell to test (e.g. 'AA1')
$b
Second cell to test (e.g. 'Z1')

Returns

integer
private static boolean
# cellAddressInDeleteRange( string $cellAddress, integer $beforeRow, integer $pNumRows, integer $beforeColumnIndex, integer $pNumCols )

Test whether a cell address falls within a defined range of cells

Test whether a cell address falls within a defined range of cells

Parameters

$cellAddress
Address of the cell we're testing
$beforeRow
Number of the row we're inserting/deleting before
$pNumRows
Number of rows to insert/delete (negative values indicate deletion)
$beforeColumnIndex
Index number of the column we're inserting/deleting before
$pNumCols
Number of columns to insert/delete (negative values indicate deletion)

Returns

boolean
protected
# _adjustPageBreaks( PHPExcel_Worksheet $pSheet, string $pBefore, integer $beforeColumnIndex, integer $pNumCols, integer $beforeRow, integer $pNumRows )

Update page breaks when inserting/deleting rows/columns

Update page breaks when inserting/deleting rows/columns

Parameters

$pSheet
The worksheet that we're editing
$pBefore
Insert/Delete before this cell address (e.g. 'A1')
$beforeColumnIndex
Index number of the column we're inserting/deleting before
$pNumCols
Number of columns to insert/delete (negative values indicate deletion)
$beforeRow
Number of the row we're inserting/deleting before
$pNumRows
Number of rows to insert/delete (negative values indicate deletion)
protected
# _adjustComments( PHPExcel_Worksheet $pSheet, string $pBefore, integer $beforeColumnIndex, integer $pNumCols, integer $beforeRow, integer $pNumRows )

Update cell comments when inserting/deleting rows/columns

Update cell comments when inserting/deleting rows/columns

Parameters

$pSheet
The worksheet that we're editing
$pBefore
Insert/Delete before this cell address (e.g. 'A1')
$beforeColumnIndex
Index number of the column we're inserting/deleting before
$pNumCols
Number of columns to insert/delete (negative values indicate deletion)
$beforeRow
Number of the row we're inserting/deleting before
$pNumRows
Number of rows to insert/delete (negative values indicate deletion)
protected
# _adjustHyperlinks( PHPExcel_Worksheet $pSheet, string $pBefore, integer $beforeColumnIndex, integer $pNumCols, integer $beforeRow, integer $pNumRows )

Update hyperlinks when inserting/deleting rows/columns

Update hyperlinks when inserting/deleting rows/columns

Parameters

$pSheet
The worksheet that we're editing
$pBefore
Insert/Delete before this cell address (e.g. 'A1')
$beforeColumnIndex
Index number of the column we're inserting/deleting before
$pNumCols
Number of columns to insert/delete (negative values indicate deletion)
$beforeRow
Number of the row we're inserting/deleting before
$pNumRows
Number of rows to insert/delete (negative values indicate deletion)
protected
# _adjustDataValidations( PHPExcel_Worksheet $pSheet, string $pBefore, integer $beforeColumnIndex, integer $pNumCols, integer $beforeRow, integer $pNumRows )

Update data validations when inserting/deleting rows/columns

Update data validations when inserting/deleting rows/columns

Parameters

$pSheet
The worksheet that we're editing
$pBefore
Insert/Delete before this cell address (e.g. 'A1')
$beforeColumnIndex
Index number of the column we're inserting/deleting before
$pNumCols
Number of columns to insert/delete (negative values indicate deletion)
$beforeRow
Number of the row we're inserting/deleting before
$pNumRows
Number of rows to insert/delete (negative values indicate deletion)
protected
# _adjustMergeCells( PHPExcel_Worksheet $pSheet, string $pBefore, integer $beforeColumnIndex, integer $pNumCols, integer $beforeRow, integer $pNumRows )

Update merged cells when inserting/deleting rows/columns

Update merged cells when inserting/deleting rows/columns

Parameters

$pSheet
The worksheet that we're editing
$pBefore
Insert/Delete before this cell address (e.g. 'A1')
$beforeColumnIndex
Index number of the column we're inserting/deleting before
$pNumCols
Number of columns to insert/delete (negative values indicate deletion)
$beforeRow
Number of the row we're inserting/deleting before
$pNumRows
Number of rows to insert/delete (negative values indicate deletion)
protected
# _adjustProtectedCells( PHPExcel_Worksheet $pSheet, string $pBefore, integer $beforeColumnIndex, integer $pNumCols, integer $beforeRow, integer $pNumRows )

Update protected cells when inserting/deleting rows/columns

Update protected cells when inserting/deleting rows/columns

Parameters

$pSheet
The worksheet that we're editing
$pBefore
Insert/Delete before this cell address (e.g. 'A1')
$beforeColumnIndex
Index number of the column we're inserting/deleting before
$pNumCols
Number of columns to insert/delete (negative values indicate deletion)
$beforeRow
Number of the row we're inserting/deleting before
$pNumRows
Number of rows to insert/delete (negative values indicate deletion)
protected
# _adjustColumnDimensions( PHPExcel_Worksheet $pSheet, string $pBefore, integer $beforeColumnIndex, integer $pNumCols, integer $beforeRow, integer $pNumRows )

Update column dimensions when inserting/deleting rows/columns

Update column dimensions when inserting/deleting rows/columns

Parameters

$pSheet
The worksheet that we're editing
$pBefore
Insert/Delete before this cell address (e.g. 'A1')
$beforeColumnIndex
Index number of the column we're inserting/deleting before
$pNumCols
Number of columns to insert/delete (negative values indicate deletion)
$beforeRow
Number of the row we're inserting/deleting before
$pNumRows
Number of rows to insert/delete (negative values indicate deletion)
protected
# _adjustRowDimensions( PHPExcel_Worksheet $pSheet, string $pBefore, integer $beforeColumnIndex, integer $pNumCols, integer $beforeRow, integer $pNumRows )

Update row dimensions when inserting/deleting rows/columns

Update row dimensions when inserting/deleting rows/columns

Parameters

$pSheet
The worksheet that we're editing
$pBefore
Insert/Delete before this cell address (e.g. 'A1')
$beforeColumnIndex
Index number of the column we're inserting/deleting before
$pNumCols
Number of columns to insert/delete (negative values indicate deletion)
$beforeRow
Number of the row we're inserting/deleting before
$pNumRows
Number of rows to insert/delete (negative values indicate deletion)
public
# insertNewBefore( string $pBefore = 'A1', integer $pNumCols = 0, integer $pNumRows = 0, PHPExcel_Worksheet $pSheet = NULL )

Insert a new column or row, updating all possible related data

Insert a new column or row, updating all possible related data

Parameters

$pBefore
Insert before this cell address (e.g. 'A1')
$pNumCols
Number of columns to insert/delete (negative values indicate deletion)
$pNumRows
Number of rows to insert/delete (negative values indicate deletion)
$pSheet
The worksheet that we're editing

Throws

PHPExcel_Exception
public string
# updateFormulaReferences( string $pFormula = '', integer $pBefore = 'A1', integer $pNumCols = 0, integer $pNumRows = 0, string $sheetName = '' )

Update references within formulas

Update references within formulas

Parameters

$pFormula
Formula to update
$pBefore
Insert before this one
$pNumCols
Number of columns to insert
$pNumRows
Number of rows to insert
$sheetName
Worksheet name/title

Returns

string
Updated formula

Throws

PHPExcel_Exception
public string
# updateCellReference( string $pCellRange = 'A1', integer $pBefore = 'A1', integer $pNumCols = 0, integer $pNumRows = 0 )

Update cell reference

Update cell reference

Parameters

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

Returns

string
Updated cell range

Throws

PHPExcel_Exception
public
# updateNamedFormulas( PHPExcel $pPhpExcel, string $oldName = '', string $newName = '' )

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

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

Parameters

$pPhpExcel
Object to update
$oldName
Old name (name to replace)
$newName
New name
private string
# _updateCellRange( string $pCellRange = 'A1:A1', integer $pBefore = 'A1', integer $pNumCols = 0, integer $pNumRows = 0 )

Update cell range

Update cell range

Parameters

$pCellRange
Cell range (e.g. 'B2:D4', 'B:C' or '2:3')
$pBefore
Insert before this one
$pNumCols
Number of columns to increment
$pNumRows
Number of rows to increment

Returns

string
Updated cell range

Throws

PHPExcel_Exception
private string
# _updateSingleCellReference( string $pCellReference = 'A1', integer $pBefore = 'A1', integer $pNumCols = 0, integer $pNumRows = 0 )

Update single cell reference

Update single cell reference

Parameters

$pCellReference
Single cell reference
$pBefore
Insert before this one
$pNumCols
Number of columns to increment
$pNumRows
Number of rows to increment

Returns

string
Updated cell reference

Throws

PHPExcel_Exception
final public
# __clone( )

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

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

Throws

PHPExcel_Exception
Constants summary
string REFHELPER_REGEXP_CELLREF

Regular Expressions

Regular Expressions

# '((\w*|\'[^!]*\')!)?(?<![:a-z\$])(\$?[a-z]{1,3}\$?\d+)(?=[^:!\d\'])'
string REFHELPER_REGEXP_CELLRANGE
# '((\w*|\'[^!]*\')!)?(\$?[a-z]{1,3}\$?\d+):(\$?[a-z]{1,3}\$?\d+)'
string REFHELPER_REGEXP_ROWRANGE
# '((\w*|\'[^!]*\')!)?(\$?\d+):(\$?\d+)'
string REFHELPER_REGEXP_COLRANGE
# '((\w*|\'[^!]*\')!)?(\$?[a-z]{1,3}):(\$?[a-z]{1,3})'
Properties summary
private static PHPExcel_ReferenceHelper $_instance

Instance of this class

Instance of this class

#
Autene API documentation generated by ApiGen