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p؉q9֪zqC@ٹHw5vL@k %42.>1*vޖ>dhL~d;OdZWEw9(=+G-霫0t||/A~:̨m%} +hv= 1-F\`Xo^/ ĢQ$3 ĢQ$31* qtJh T_@XE(w1ᆪSd8\h/sbɾ0h3am OShZgCzn=smW&2i8d'\Ofv#%95ū{WGֆs'~ \ !c|כ z޾!o+lo/(KD۔QK5'H<ţ@=/翥.?6?҉"zKv%/:@ؑ,0ةvHz4Lk+g {oay$!}i}E…m$ cG|c ˍ?LaрgetRow() : 1; } /** * 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]) * * @param null|array|string $cellAddress A reference to a range of cells for which you want the row numbers * * @return int|mixed[]|string */ public static function ROW($cellAddress = null, ?Cell $cell = null) { if (self::cellAddressNullOrWhitespace($cellAddress)) { return self::cellRow($cell); } if (is_array($cellAddress)) { foreach ($cellAddress as $rowKey => $rowValue) { foreach ($rowValue as $columnKey => $cellValue) { return (int) preg_replace('/\D/', '', $rowKey); } } return self::cellRow($cell); } $cellAddress = $cellAddress ?? ''; if ($cell !== null) { [,, $sheetName] = Helpers::extractWorksheet($cellAddress, $cell); [,, $cellAddress] = Helpers::extractCellAddresses($cellAddress, true, $cell->getWorksheet(), $sheetName); } [, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true); if (strpos($cellAddress, ':') !== false) { [$startAddress, $endAddress] = explode(':', $cellAddress); $startAddress = (string) preg_replace('/\D/', '', $startAddress); $endAddress = (string) preg_replace('/\D/', '', $endAddress); return array_map( function ($value) { return [$value]; }, range($startAddress, $endAddress) ); } [$cellAddress] = explode(':', $cellAddress); return (int) preg_replace('/\D/', '', $cellAddress); } /** * ROWS. * * Returns the number of rows in an array or reference. * * Excel Function: * =ROWS(cellAddress) * * @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells * for which you want the number of rows * * @return int|string The number of rows in cellAddress, or a string if arguments are invalid */ public static function ROWS($cellAddress = null) { if (self::cellAddressNullOrWhitespace($cellAddress)) { return 1; } if (!is_array($cellAddress)) { return ExcelError::VALUE(); } reset($cellAddress); $isMatrix = (is_numeric(key($cellAddress))); [$columns, $rows] = Calculation::getMatrixDimensions($cellAddress); if ($isMatrix) { return $columns; } return $rows; } }