Phpexcel, which is quite classic and powerful, exports tens of thousands or even hundreds of thousands of records of code. This question has been asked several times and has not been answered. Therefore, I will study it carefully and refer to relevant materials, finally.
Http://www.youyax.com/forum/index.php/Content-index-id-5058.shtml
The principle is
For example, if the database has 10 thousand records to export, it is estimated that the browser will crash as soon as 10 thousand records are exported.
The idea of this approach is,
1. first query whether the xx.xls file exists. if it does not exist, create the file (first judgment)
2. set the title of the first line (first judgment), read the total number of rows, and then export 500 records.
3. write the xx.xls file,
4. jump to the current page and repeat the previous steps.
Reply to discussion (solution)
A browser crashes? Excel supports a maximum of 65535 lines per tab. isn't phpexcel very weak?
In this simple description, we still don't know about Cainiao.
Er, er ????
Phpexcel provides various caching methods, why not