'spreadsheet import excel to array timeout


I have written a piece of code that turns into array an excel that a user uploads. on 5/10 rows works totally fine but if i try to upload a bigger file ( not that big, something like 150 rows X 8 columns) i get a timeout error.
    $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
    $reader->setReadDataOnly(true);

    $spreadsheet = $reader->load($_FILES["file"]["tmp_name"]);

    $sheet = $spreadsheet->getSheet($spreadsheet->getFirstSheetIndex());
    $data = $sheet->toArray();

what am i doing wrong?

The error message

Fatal error: Maximum execution time of 120 seconds exceeded in C:\xampp\htdocs\testversion\vendor\kint-php\kint\src\Object\Blob.php on line 72



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source