ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PhpOffice\PhpSpreadsheet\Calculation\LookupRef Class Reference
+ Collaboration diagram for PhpOffice\PhpSpreadsheet\Calculation\LookupRef:

Static Public Member Functions

static cellAddress ($row, $column, $relativity=1, $referenceStyle=true, $sheetText='')
 CELL_ADDRESS. More...
 
static COLUMN ($cellAddress=null, ?Cell $cell=null)
 COLUMN. More...
 
static COLUMNS ($cellAddress=null)
 COLUMNS. More...
 
static ROW ($cellAddress=null, ?Cell $cell=null)
 ROW. More...
 
static ROWS ($cellAddress=null)
 ROWS. More...
 
static HYPERLINK ($linkURL='', $displayName=null, ?Cell $pCell=null)
 HYPERLINK. More...
 
static INDIRECT ($cellAddress, Cell $pCell)
 INDIRECT. More...
 
static OFFSET ($cellAddress=null, $rows=0, $columns=0, $height=null, $width=null, ?Cell $pCell=null)
 OFFSET. More...
 
static CHOOSE (... $chooseArgs)
 CHOOSE. More...
 
static MATCH ($lookupValue, $lookupArray, $matchType=1)
 MATCH. More...
 
static INDEX ($matrix, $rowNum=0, $columnNum=0)
 INDEX. More...
 
static TRANSPOSE ($matrixData)
 TRANSPOSE. More...
 
static VLOOKUP ($lookup_value, $lookup_array, $index_number, $not_exact_match=true)
 VLOOKUP The VLOOKUP function searches for value in the left-most column of lookup_array and returns the value in the same row based on the index_number. More...
 
static HLOOKUP ($lookup_value, $lookup_array, $index_number, $not_exact_match=true)
 HLOOKUP The HLOOKUP function searches for value in the top-most row of lookup_array and returns the value in the same column based on the index_number. More...
 
static LOOKUP ($lookup_value, $lookup_vector, $result_vector=null)
 LOOKUP The LOOKUP function searches for value either from a one-row or one-column range or from an array. More...
 
static FORMULATEXT ($cellReference='', ?Cell $pCell=null)
 FORMULATEXT. More...
 

Detailed Description

Deprecated:
1.18.0

Definition at line 19 of file LookupRef.php.

Member Function Documentation

◆ cellAddress()

static PhpOffice\PhpSpreadsheet\Calculation\LookupRef::cellAddress (   $row,
  $column,
  $relativity = 1,
  $referenceStyle = true,
  $sheetText = '' 
)
static

CELL_ADDRESS.

Creates a cell address as text, given specified row and column numbers.

Excel Function: =ADDRESS(row, column, [relativity], [referenceStyle], [sheetText])

1.18.0

See also
LookupRef::cell() Use the cell() method in the LookupRef class instead
Parameters
mixed$rowRow number to use in the cell reference
mixed$columnColumn number to use in the cell reference
int$relativityFlag indicating the type of reference to return 1 or omitted Absolute 2 Absolute row; relative column 3 Relative row; absolute column 4 Relative
bool$referenceStyleA logical value that specifies the A1 or R1C1 reference style. TRUE or omitted CELL_ADDRESS returns an A1-style reference FALSE CELL_ADDRESS returns an R1C1-style reference
string$sheetTextOptional Name of worksheet to use
Returns
string

Definition at line 48 of file LookupRef.php.

References $row, and PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Address\cell().

49  {
50  return Address::cell($row, $column, $relativity, $referenceStyle, $sheetText);
51  }
static cell($row, $column, $relativity=1, $referenceStyle=true, $sheetName='')
ADDRESS.
Definition: Address.php:40
$row
+ Here is the call graph for this function:

◆ CHOOSE()

static PhpOffice\PhpSpreadsheet\Calculation\LookupRef::CHOOSE (   $chooseArgs)
static

CHOOSE.

Uses lookup_value to return a value from the list of value arguments. Use CHOOSE to select one of up to 254 values based on the lookup_value.

Excel Function: =CHOOSE(index_num, value1, [value2], ...)

1.18.0

See also
LookupRef::choose() Use the choose() method in the LookupRef class instead
Returns
mixed The selected value

Definition at line 257 of file LookupRef.php.

References PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Selection\choose().

258  {
259  return LookupRef\Selection::choose(...$chooseArgs);
260  }
+ Here is the call graph for this function:

◆ COLUMN()

static PhpOffice\PhpSpreadsheet\Calculation\LookupRef::COLUMN (   $cellAddress = null,
?Cell  $cell = null 
)
static

COLUMN.

Returns the column number of the given cell reference If the cell reference is a range of cells, COLUMN returns the column numbers of each column in the reference as a horizontal array. If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the reference of the cell in which the COLUMN function appears; otherwise this function returns 1.

Excel Function: =COLUMN([cellAddress])

1.18.0

See also
LookupRef::COLUMN() Use the COLUMN() method in the LookupRef class instead
Parameters
null | array | string$cellAddressA reference to a range of cells for which you want the column numbers
Returns
int|int[]|string

Definition at line 75 of file LookupRef.php.

References PhpOffice\PhpSpreadsheet\Calculation\LookupRef\RowColumnInformation\COLUMN().

76  {
77  return RowColumnInformation::COLUMN($cellAddress, $cell);
78  }
static COLUMN($cellAddress=null, ?Cell $pCell=null)
COLUMN.
+ Here is the call graph for this function:

◆ COLUMNS()

static PhpOffice\PhpSpreadsheet\Calculation\LookupRef::COLUMNS (   $cellAddress = null)
static

COLUMNS.

Returns the number of columns in an array or reference.

Excel Function: =COLUMNS(cellAddress)

1.18.0

See also
LookupRef::COLUMNS() Use the COLUMNS() method in the LookupRef class instead
Parameters
null | array | string$cellAddressAn array or array formula, or a reference to a range of cells for which you want the number of columns
Returns
int|string The number of columns in cellAddress, or a string if arguments are invalid

Definition at line 98 of file LookupRef.php.

References PhpOffice\PhpSpreadsheet\Calculation\LookupRef\RowColumnInformation\COLUMNS().

99  {
100  return RowColumnInformation::COLUMNS($cellAddress);
101  }
+ Here is the call graph for this function:

◆ FORMULATEXT()

static PhpOffice\PhpSpreadsheet\Calculation\LookupRef::FORMULATEXT (   $cellReference = '',
?Cell  $pCell = null 
)
static

FORMULATEXT.

1.18.0

See also
LookupRef::text() Use the text() method in the LookupRef class instead
Parameters
mixed$cellReferenceThe cell to check
Cell$pCellThe current cell (containing this formula)
Returns
string

Definition at line 412 of file LookupRef.php.

References PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Formula\text().

413  {
414  return LookupRef\Formula::text($cellReference, $pCell);
415  }
static text($cellReference='', ?Cell $pCell=null)
FORMULATEXT.
Definition: Formula.php:19
+ Here is the call graph for this function:

◆ HLOOKUP()

static PhpOffice\PhpSpreadsheet\Calculation\LookupRef::HLOOKUP (   $lookup_value,
  $lookup_array,
  $index_number,
  $not_exact_match = true 
)
static

HLOOKUP The HLOOKUP function searches for value in the top-most row of lookup_array and returns the value in the same column based on the index_number.

1.18.0

See also
LookupRef::lookup() Use the lookup() method in the LookupRef class instead
Parameters
mixed$lookup_valueThe value that you want to match in lookup_array
mixed$lookup_arrayThe range of cells being searched
mixed$index_numberThe row number in table_array from which the matching value must be returned. The first row is 1.
mixed$not_exact_matchdetermines if you are looking for an exact match based on lookup_value
Returns
mixed The value of the found cell

Definition at line 374 of file LookupRef.php.

References PhpOffice\PhpSpreadsheet\Calculation\LookupRef\HLookup\lookup().

375  {
376  return HLookup::lookup($lookup_value, $lookup_array, $index_number, $not_exact_match);
377  }
static lookup($lookupValue, $lookupArray, $indexNumber, $notExactMatch=true)
HLOOKUP The HLOOKUP function searches for value in the top-most row of lookup_array and returns the v...
Definition: HLookup.php:24
+ Here is the call graph for this function:

◆ HYPERLINK()

static PhpOffice\PhpSpreadsheet\Calculation\LookupRef::HYPERLINK (   $linkURL = '',
  $displayName = null,
?Cell  $pCell = null 
)
static

HYPERLINK.

Excel Function: =HYPERLINK(linkURL,displayName)

1.18.0

See also
LookupRef::set() Use the set() method in the LookupRef class instead
Parameters
mixed$linkURLExpect string. Value to check, is also the value returned when no error
mixed$displayNameExpect string. Value to return when testValue is an error condition
Cell$pCellThe cell to set the hyperlink in
Returns
string The value of $displayName (or $linkURL if $displayName was blank)

Definition at line 170 of file LookupRef.php.

References PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Hyperlink\set().

171  {
172  return LookupRef\Hyperlink::set($linkURL, $displayName, $pCell);
173  }
+ Here is the call graph for this function:

◆ INDEX()

static PhpOffice\PhpSpreadsheet\Calculation\LookupRef::INDEX (   $matrix,
  $rowNum = 0,
  $columnNum = 0 
)
static

INDEX.

Uses an index to choose a value from a reference or array

Excel Function: =INDEX(range_array, row_num, [column_num])

1.18.0

See also
LookupRef::index() Use the index() method in the LookupRef class instead
Parameters
mixed$rowNumThe row in the array or range from which to return a value. If row_num is omitted, column_num is required.
mixed$columnNumThe column in the array or range from which to return a value. If column_num is omitted, row_num is required.
mixed$matrix
Returns
mixed the value of a specified cell or array of cells

Definition at line 308 of file LookupRef.php.

References $matrix, and PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Matrix\index().

309  {
310  return Matrix::index($matrix, $rowNum, $columnNum);
311  }
static index($matrix, $rowNum=0, $columnNum=0)
INDEX.
Definition: Matrix.php:55
$matrix
Definition: test.php:18
+ Here is the call graph for this function:

◆ INDIRECT()

static PhpOffice\PhpSpreadsheet\Calculation\LookupRef::INDIRECT (   $cellAddress,
Cell  $pCell 
)
static

INDIRECT.

Returns the reference specified by a text string. References are immediately evaluated to display their contents.

Excel Function: =INDIRECT(cellAddress)

1.18.0

See also
LookupRef::INDIRECT() Use the INDIRECT() method in the LookupRef class instead

NOTE - INDIRECT() does not yet support the optional a1 parameter introduced in Excel 2010

Parameters
array | string$cellAddress$cellAddress The cell address of the current cell (containing this formula)
Cell$pCellThe current cell (containing this formula)
Returns
array|string An array containing a cell or range of cells, or a string on error

Definition at line 196 of file LookupRef.php.

References PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Indirect\INDIRECT().

197  {
198  return Indirect::INDIRECT($cellAddress, true, $pCell);
199  }
static INDIRECT($cellAddress, $a1fmt, Cell $pCell)
INDIRECT.
Definition: Indirect.php:63
+ Here is the call graph for this function:

◆ LOOKUP()

static PhpOffice\PhpSpreadsheet\Calculation\LookupRef::LOOKUP (   $lookup_value,
  $lookup_vector,
  $result_vector = null 
)
static

LOOKUP The LOOKUP function searches for value either from a one-row or one-column range or from an array.

1.18.0

See also
LookupRef::lookup() Use the lookup() method in the LookupRef class instead
Parameters
mixed$lookup_valueThe value that you want to match in lookup_array
mixed$lookup_vectorThe range of cells being searched
null | mixed$result_vectorThe column from which the matching value must be returned
Returns
mixed The value of the found cell

Definition at line 394 of file LookupRef.php.

References PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Lookup\lookup().

395  {
396  return Lookup::lookup($lookup_value, $lookup_vector, $result_vector);
397  }
static lookup($lookupValue, $lookupVector, $resultVector=null)
LOOKUP The LOOKUP function searches for value either from a one-row or one-column range or from an ar...
Definition: Lookup.php:20
+ Here is the call graph for this function:

◆ MATCH()

static PhpOffice\PhpSpreadsheet\Calculation\LookupRef::MATCH (   $lookupValue,
  $lookupArray,
  $matchType = 1 
)
static

MATCH.

The MATCH function searches for a specified item in a range of cells

Excel Function: =MATCH(lookup_value, lookup_array, [match_type])

1.18.0

See also
LookupRef::MATCH() Use the MATCH() method in the LookupRef class instead
Parameters
mixed$lookupValueThe value that you want to match in lookup_array
mixed$lookupArrayThe range of cells being searched
mixed$matchTypeThe number -1, 0, or 1. -1 means above, 0 means exact match, 1 means below. If match_type is 1 or -1, the list has to be ordered.
Returns
int|string The relative position of the found item

Definition at line 282 of file LookupRef.php.

References PhpOffice\PhpSpreadsheet\Calculation\LookupRef\ExcelMatch\MATCH().

283  {
284  return LookupRef\ExcelMatch::MATCH($lookupValue, $lookupArray, $matchType);
285  }
static MATCH($lookupValue, $lookupArray, $matchType=self::MATCHTYPE_LARGEST_VALUE)
MATCH.
Definition: ExcelMatch.php:31
+ Here is the call graph for this function:

◆ OFFSET()

static PhpOffice\PhpSpreadsheet\Calculation\LookupRef::OFFSET (   $cellAddress = null,
  $rows = 0,
  $columns = 0,
  $height = null,
  $width = null,
?Cell  $pCell = null 
)
static

OFFSET.

Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells. The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and the number of columns to be returned.

Excel Function: =OFFSET(cellAddress, rows, cols, [height], [width])

1.18.0

See also
LookupRef::OFFSET() Use the OFFSET() method in the LookupRef class instead
Parameters
null | string$cellAddressThe reference from which you want to base the offset. Reference must refer to a cell or range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value.
mixed$rowsThe number of rows, up or down, that you want the upper-left cell to refer to. Using 5 as the rows argument specifies that the upper-left cell in the reference is five rows below reference. Rows can be positive (which means below the starting reference) or negative (which means above the starting reference).
mixed$columnsThe number of columns, to the left or right, that you want the upper-left cell of the result to refer to. Using 5 as the cols argument specifies that the upper-left cell in the reference is five columns to the right of reference. Cols can be positive (which means to the right of the starting reference) or negative (which means to the left of the starting reference).
mixed$heightThe height, in number of rows, that you want the returned reference to be. Height must be a positive number.
mixed$widthThe width, in number of columns, that you want the returned reference to be. Width must be a positive number.
Returns
array|string An array containing a cell or range of cells, or a string on error

Definition at line 236 of file LookupRef.php.

References $columns, $rows, and PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Offset\OFFSET().

237  {
238  return Offset::OFFSET($cellAddress, $rows, $columns, $height, $width, $pCell);
239  }
static OFFSET($cellAddress=null, $rows=0, $columns=0, $height=null, $width=null, ?Cell $pCell=null)
OFFSET.
Definition: Offset.php:43
$rows
Definition: xhr_table.php:10
if(! $in) $columns
Definition: Utf8Test.php:45
+ Here is the call graph for this function:

◆ ROW()

static PhpOffice\PhpSpreadsheet\Calculation\LookupRef::ROW (   $cellAddress = null,
?Cell  $cell = null 
)
static

ROW.

Returns the row number of the given cell reference If the cell reference is a range of cells, ROW returns the row numbers of each row in the reference as a vertical array. If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the reference of the cell in which the ROW function appears; otherwise this function returns 1.

Excel Function: =ROW([cellAddress])

1.18.0

See also
LookupRef::ROW() Use the ROW() method in the LookupRef class instead
Parameters
null | array | string$cellAddressA reference to a range of cells for which you want the row numbers
Returns
int|mixed[]|string

Definition at line 125 of file LookupRef.php.

References PhpOffice\PhpSpreadsheet\Calculation\LookupRef\RowColumnInformation\ROW().

126  {
127  return RowColumnInformation::ROW($cellAddress, $cell);
128  }
+ Here is the call graph for this function:

◆ ROWS()

static PhpOffice\PhpSpreadsheet\Calculation\LookupRef::ROWS (   $cellAddress = null)
static

ROWS.

Returns the number of rows in an array or reference.

Excel Function: =ROWS(cellAddress)

1.18.0

See also
LookupRef::ROWS() Use the ROWS() method in the LookupRef class instead
Parameters
null | array | string$cellAddressAn array or array formula, or a reference to a range of cells for which you want the number of rows
Returns
int|string The number of rows in cellAddress, or a string if arguments are invalid

Definition at line 148 of file LookupRef.php.

References PhpOffice\PhpSpreadsheet\Calculation\LookupRef\RowColumnInformation\ROWS().

149  {
150  return RowColumnInformation::ROWS($cellAddress);
151  }
+ Here is the call graph for this function:

◆ TRANSPOSE()

static PhpOffice\PhpSpreadsheet\Calculation\LookupRef::TRANSPOSE (   $matrixData)
static

TRANSPOSE.

1.18.0

See also
LookupRef::transpose() Use the transpose() method in the LookupRef class instead
Parameters
array$matrixDataA matrix of values
Returns
array

Unlike the Excel TRANSPOSE function, which will only work on a single row or column, this function will transpose a full matrix

Definition at line 328 of file LookupRef.php.

References PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Matrix\transpose().

329  {
330  return Matrix::transpose($matrixData);
331  }
static transpose($matrixData)
TRANSPOSE.
Definition: Matrix.php:17
+ Here is the call graph for this function:

◆ VLOOKUP()

static PhpOffice\PhpSpreadsheet\Calculation\LookupRef::VLOOKUP (   $lookup_value,
  $lookup_array,
  $index_number,
  $not_exact_match = true 
)
static

VLOOKUP The VLOOKUP function searches for value in the left-most column of lookup_array and returns the value in the same row based on the index_number.

1.18.0

See also
LookupRef::lookup() Use the lookup() method in the LookupRef class instead
Parameters
mixed$lookup_valueThe value that you want to match in lookup_array
mixed$lookup_arrayThe range of cells being searched
mixed$index_numberThe column number in table_array from which the matching value must be returned. The first column is 1.
mixed$not_exact_matchdetermines if you are looking for an exact match based on lookup_value
Returns
mixed The value of the found cell

Definition at line 351 of file LookupRef.php.

References PhpOffice\PhpSpreadsheet\Calculation\LookupRef\VLookup\lookup().

352  {
353  return VLookup::lookup($lookup_value, $lookup_array, $index_number, $not_exact_match);
354  }
static lookup($lookupValue, $lookupArray, $indexNumber, $notExactMatch=true)
VLOOKUP The VLOOKUP function searches for value in the left-most column of lookup_array and returns t...
Definition: VLookup.php:24
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: