Load file xlsx is very slow
Author: nguyenthao1988Created Feb 22, 2024Updated Mar 20, 2026
`<?php
require 'vendor/autoload.php';
use PhpOffice\PhpSpreadsheet\IOFactory; $filename = 'data/danhsach.xlsx'; //$filename = 'data/nhanvien.xlsx'; $spreadsheet = IOFactory::load($filename);`
I use this code load file "danhsach.xlsx" with 16k record, file size excel: 7MB. +> this code load finish taken time: 32s
how to optimize this, i load full column and row, not limit.
I used: PHP: 8.2.4 PhpSpreadsheet: 2.0
Thanks bro,
Source: PHPOffice/PhpSpreadsheet