http://opendata.kedirikab.go.id/index.php/dataset/3782/csv/download_excel

Exceptions

Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 10485760 bytes)

Exception

Symfony\Component\ErrorHandler\Error\ OutOfMemoryError

  1.             $this->storeCurrentCell();
  2.         }
  3.         $column 0;
  4.         $row '';
  5.         sscanf($cellCoordinate'%[A-Z]%d'$column$row);
  6.         $this->index[$cellCoordinate] = (--$row self::MAX_COLUMN_ID) + Coordinate::columnIndexFromString((string) $column);
  7.         $this->currentCoordinate $cellCoordinate;
  8.         $this->currentCell $cell;
  9.         $this->currentCellIsDirty true;
  1.      */
  2.     public function createNewCell($coordinate): Cell
  3.     {
  4.         [$column$row$columnString] = Coordinate::indexesFromString($coordinate);
  5.         $cell = new Cell(nullDataType::TYPE_NULL$this);
  6.         $this->cellCollection->add($coordinate$cell);
  7.         // Coordinates
  8.         if ($column $this->cachedHighestColumn) {
  9.             $this->cachedHighestColumn $column;
  10.         }
  1.         /** @var Worksheet $sheet */
  2.         [$sheet$finalCoordinate] = $this->getWorksheetAndCoordinate($cellAddress);
  3.         $cell $sheet->cellCollection->get($finalCoordinate);
  4.         return $cell ?? $sheet->createNewCell($finalCoordinate);
  5.     }
  6.     /**
  7.      * Get the correct Worksheet and coordinate from a coordinate that may
  8.      * contains reference to another sheet or a named range.
  1.                         $this->getCell($currentColumn $startRow)->setValue($cellValue);
  2.                     }
  3.                 } else {
  4.                     if ($cellValue != $nullValue) {
  5.                         // Set cell value
  6.                         $this->getCell($currentColumn $startRow)->setValue($cellValue);
  7.                     }
  8.                 }
  9.                 ++$currentColumn;
  10.             }
  11.             ++$startRow;
Worksheet->fromArray() in src/Controller/Frontend/DatasetController.php (line 363)
  1.                 $sheet->getStyle($cols '2:' $cols . (count($dataset) + 1))->applyFromArray($styleBorder);
  2.                 $cols++;
  3.             }
  4.         }
  5.         $sheet->fromArray($datasetnull'A2');
  6.         header('Content-Type: application/vnd.ms-excel');
  7.         header('Content-Disposition: attachment; filename="' substr($publikasi->getJudul(), 030) . '.' $tipe '"');
  8.         if ($tipe == 'xlsx') {
in vendor/symfony/http-kernel/HttpKernel.php -> downloadExcel (line 163)
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle() in public/index.php (line 20)
  1.     Debug::enable();
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);
{main}() in public/index.php (line 1)
  1. <?php
  2. use App\Kernel;
  3. use Symfony\Component\Dotenv\Dotenv;
  4. use Symfony\Component\ErrorHandler\Debug;

Stack Trace

OutOfMemoryError
Symfony\Component\ErrorHandler\Error\OutOfMemoryError:
Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 10485760 bytes)

  at vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/Cells.php:395
  at PhpOffice\PhpSpreadsheet\Collection\Cells->add()
     (vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php:1401)
  at PhpOffice\PhpSpreadsheet\Worksheet\Worksheet->createNewCell()
     (vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php:1289)
  at PhpOffice\PhpSpreadsheet\Worksheet\Worksheet->getCell()
     (vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php:3019)
  at PhpOffice\PhpSpreadsheet\Worksheet\Worksheet->fromArray()
     (src/Controller/Frontend/DatasetController.php:363)
  at App\Controller\Frontend\DatasetController->downloadExcel()
     (vendor/symfony/http-kernel/HttpKernel.php:163)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at App\Kernel->handle()
     (public/index.php:20)
  at {main}()