/** * ROWS * * Returns the number of rows in an array or reference. * * @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows * @return integer */ public static function ROWS($cellAddress = Null) { if (is_null($cellAddress) || $cellAddress === '') { return 1; } elseif (!is_array($cellAddress)) { return self::$_errorCodes['value']; } $i = array_keys($cellAddress); $isMatrix = is_numeric(array_shift($i)); list($columns, $rows) = Calculation::_getMatrixDimensions($cellAddress); if ($isMatrix) { return $columns; } else { return $rows; } }