PhpSpreadsheet icon indicating copy to clipboard operation
PhpSpreadsheet copied to clipboard

Load file xlsx is very slow

Open nguyenthao1988 opened this issue 1 year ago • 31 comments

`<?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,

nguyenthao1988 avatar Feb 22 '24 08:02 nguyenthao1988

I have an XLSX that is 1.4MB and my code just hangs when I use the same method, doesn't even finish.

tvillafane avatar Apr 10 '24 18:04 tvillafane

@tvillafane please use https://github.com/aVadim483/fast-excel-reader is better faster

nguyenthao1988 avatar Apr 12 '24 03:04 nguyenthao1988

Same problem.

henno avatar Apr 18 '24 09:04 henno

相同问题,2.2mb的文件,执行IOFactory::load()竟然需要四五十秒,有优化的方案吗?

nineday90 avatar Aug 09 '24 01:08 nineday90