PHPOffice / PhpSpreadsheet

A pure PHP library for reading and writing spreadsheet files
https://phpspreadsheet.readthedocs.io
MIT License
13.14k stars 3.36k forks source link

Load file xlsx is very slow #3917

Open nguyenthao1988 opened 4 months ago

nguyenthao1988 commented 4 months ago

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

tvillafane commented 3 months ago

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

nguyenthao1988 commented 3 months ago

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

henno commented 3 months ago

Same problem.