Equivalent, classic, very powerful phpexcel, exporting tens of thousands or even hundreds of thousands of records of code sharing
Source: Internet
Author: User
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.pdf the classic and powerful phpexcel file exports code sharing of tens of thousands or even hundreds of thousands of records
I have asked this question several times and have no answer, so I have carefully studied it, read the relevant information, and finally got it out.
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. Share:
------ Solution --------------------
A browser crashes? Excel supports a maximum of 65535 lines per tab. isn't phpexcel very weak?
------ Solution --------------------
In this simple description, we still don't know about Cainiao.
------ Solution --------------------
Er, er ????
------ Solution --------------------
Phpexcel provides various caching methods, why not
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service