public static function numLinesInSheet( $path, $sheetIndex = 0 ): int {
        $emptySheetAsArray = [
            0 => [
                0 => NULL,
            ],
        ];
        $sheetName = Excel::getSheetName($path,$sheetIndex);
        $sheetAsArray      = self::sheetToArray( $path, $sheetName );
        if ( $sheetAsArray == $emptySheetAsArray ):
            return 0;
        endif;
        return count( $sheetAsArray );
    }
public static function numLinesInSheet( $path, $sheetIndex = 0 ): int {
        $emptySheetAsArray = [
            0 => [
                0 => NULL,
            ],
        ];
        $sheetName = Excel::getSheetName($path,$sheetIndex);
        $sheetAsArray      = self::sheetToArray( $path, $sheetName );
        if ( $sheetAsArray == $emptySheetAsArray ):
            return 0;
        endif;
        return count( $sheetAsArray );
    }
public static function numLinesInSheet ( $ path , $ sheetIndex = 0 ) : int { $ emptySheetAsArray = [ 0 => [ 0 => NULL , ] , ] ; $ sheetName = Excel :: getSheetName ( $ path , $ sheetIndex ) ; $ sheetAsArray = self :: sheetToArray ( $ path , $ sheetName ) ; if ( $ sheetAsArray == $ emptySheetAsArray ) : return 0 ; endif ; return count ( $ sheetAsArray ) ; }
Returns the number of lines in the sheet.
@param $path
@param int $sheetIndex
@return int
@throws \PhpOffice\PhpSpreadsheet\Exception
@throws \PhpOffice\PhpSpreadsheet\Reader\Exception
Returns the number of lines in the sheet .