Quite classic and very powerful phpexcel export tens of thousands or even hundreds of thousands of records of code sharing

Source: Internet
Author: User
This question asked several times, and did not get the answer, so I carefully study, see the relevant information, finally get out.

Http://www.youyax.com/forum/index.php/Content-index-id-5058.shtml

It's the principle that

For example, the database has 10,000 records to export, then the export of 10,000 an estimated browser will also crash.

The idea of this approach is that

1, first query Xx.xls file does not exist, does not exist on the creation (first judgment)

2, set the first row header (first judgment), then read the total number of rows, and then export 500 records

3, write Xx.xls file,

4, jump to the current page, cycle the above operation.


Reply to discussion (solution)

1w Browser crashes? That Excel support single tab Max 65535 lines, Phpexcel is not very weak

Such a simple description, rookie we still won't

Uh, uh, huh????

Phpexcel provides a variety of caching methods, why don't you

  • Contact Us

    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

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.