public static function getRows($toString=true, Array $options=[], callable $callback=null)
    {
        $worksheet = self::validSheetObj();

        // Options
        $defaultOptions = [
            'rowOffset' => 0,
            'rows' => NULL,
            'columns' => NULL,
            'timestamp' => true,
            'timestampFormat' => 'Y-m-d H:i:s', // False would use Unixtime
        ];
        $options = array_replace($defaultOptions, $options);

        // Get the highest row and column numbers referenced in the worksheet
        $highestRow = $worksheet->getHighestRow();
        $rowOffset = ($options['rowOffset'] && $options['rowOffset'] <= $highestRow) 
            ? $options['rowOffset'] 
            : 0;
        $rows = ($options['rows'] && ($rowOffset+$options['rows']) < $highestRow) 
            ? $options['rows']
            : $highestRow - $rowOffset;
        // Enhance performance for each getRow()
        $options['columns'] = ($options['columns']) ?: self::alpha2num($worksheet->getHighestColumn());

        // Set row offset
        self::$_offsetRow = $rowOffset;

        // Fetch data from the sheet
        $data = [];
        $pointerRow = &$data;
        for ($i=1; $i <= $rows ; $i++) { 
            
            $pointerRow[] = self::getRow($toString, $options, $callback);
        }

        return $data;
    }
public static function getRows($toString=true, Array $options=[], callable $callback=null)
    {
        $worksheet = self::validSheetObj();

        // Options
        $defaultOptions = [
            'rowOffset' => 0,
            'rows' => NULL,
            'columns' => NULL,
            'timestamp' => true,
            'timestampFormat' => 'Y-m-d H:i:s', // False would use Unixtime
        ];
        $options = array_replace($defaultOptions, $options);

        // Get the highest row and column numbers referenced in the worksheet
        $highestRow = $worksheet->getHighestRow();
        $rowOffset = ($options['rowOffset'] && $options['rowOffset'] <= $highestRow) 
            ? $options['rowOffset'] 
            : 0;
        $rows = ($options['rows'] && ($rowOffset+$options['rows']) < $highestRow) 
            ? $options['rows']
            : $highestRow - $rowOffset;
        // Enhance performance for each getRow()
        $options['columns'] = ($options['columns']) ?: self::alpha2num($worksheet->getHighestColumn());

        // Set row offset
        self::$_offsetRow = $rowOffset;

        // Fetch data from the sheet
        $data = [];
        $pointerRow = &$data;
        for ($i=1; $i <= $rows ; $i++) { 
            
            $pointerRow[] = self::getRow($toString, $options, $callback);
        }

        return $data;
    }
public static function getRows ( $ toString = true , Array $ options = [ ] , callable $ callback = null ) { $ worksheet = self :: validSheetObj ( ) ; // Options $ defaultOptions = [ 'rowOffset' => 0 , 'rows' => NULL , 'columns' => NULL , 'timestamp' => true , 'timestampFormat' => 'Y-m-d H:i:s' , // False would use Unixtime ] ; $ options = array_replace ( $ defaultOptions , $ options ) ; // Get the highest row and column numbers referenced in the worksheet $ highestRow = $ worksheet -> getHighestRow ( ) ; $ rowOffset = ( $ options [ 'rowOffset' ] && $ options [ 'rowOffset' ] <= $ highestRow ) ? $ options [ 'rowOffset' ] : 0 ; $ rows = ( $ options [ 'rows' ] && ( $ rowOffset + $ options [ 'rows' ] ) < $ highestRow ) ? $ options [ 'rows' ] : $ highestRow - $ rowOffset ; // Enhance performance for each getRow() $ options [ 'columns' ] = ( $ options [ 'columns' ] ) ? : self :: alpha2num ( $ worksheet -> getHighestColumn ( ) ) ; // Set row offset self :: $ _offsetRow = $ rowOffset ; // Fetch data from the sheet $ data = [ ] ; $ pointerRow = & $ data ; for ( $ i = 1 ; $ i <= $ rows ; $ i ++ ) { $ pointerRow [ ] = self :: getRow ( $ toString , $ options , $ callback ) ; } return $ data ; }
Get rows from the actived sheet of PhpSpreadsheet

@param bool $toString All values from sheet to be string type
@param bool $options [
row (int) Ended row number
column (int) Ended column number
timestamp (bool) Excel datetime to Unixtime
timestampFormat (string) Format for date() when usgin timestamp
]
@param callable $callback($cellValue, int $columnIndex, int $rowIndex)
@return array Data of Spreadsheet
Get rows from the actived sheet of PhpSpreadsheet