One million data reports: analysis and solutions

Solution Analysis

Parts per million of the amount of data import and export Excel, only discuss solutions Excel2007 based. It provides tools and solutions for the operation import large amounts of data derived in ApachePoi official, operating Excel2007 using XSSF objects, can be divided into three modes:

User: user mode has many good packaging method is simple, but created too many objects, very memory consumption (the method previously used)

Event Mode: SAX parsing XML-based way, SAX stands for Simple API for XML, which is an interface, but also a package. It is an alternative method for parsing XML, DOM parsing an XML document is different from all the contents of the disposable loading into memory the way it progressive scan a document while scanning, while parsing

SXSSF objects: is used to generate massive data excel file, excel main principle is generated by means of a temporary storage space

This is an official Apache POI picture, describing the user mode, event mode, and operating characteristics are three ways to use SXSSF Excel and CUP and memory usage based.

Released 2417 original articles · won praise 62 · Views 200,000 +

Guess you like

Origin blog.csdn.net/Leon_Jinhai_Sun/article/details/105307428