public static function PHPExcel_Calculation_LookupRef::ROWS in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/LookupRef.php \PHPExcel_Calculation_LookupRef::ROWS()
* ROWS * * Returns the number of rows in an array or reference. * * Excel Function: * =ROWS(cellAddress) * *
Parameters
cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows: * @return integer The number of rows in cellAddress
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ LookupRef.php, line 227
Class
- PHPExcel_Calculation_LookupRef
- PHPExcel_Calculation_LookupRef
Code
public static function ROWS($cellAddress = Null) {
if (is_null($cellAddress) || $cellAddress === '') {
return 1;
}
elseif (!is_array($cellAddress)) {
return PHPExcel_Calculation_Functions::VALUE();
}
$i = array_keys($cellAddress);
$isMatrix = is_numeric(array_shift($i));
list($columns, $rows) = PHPExcel_Calculation::_getMatrixDimensions($cellAddress);
if ($isMatrix) {
return $columns;
}
else {
return $rows;
}
}