1, the first time to read about 7M ecxel files, using the POI Library implementation, reference to the following blog post.
Http://www.cnblogs.com/chenfool/p/3632642.html
Using the above method in the following workbookfactory.create () there will be a memory overflow error, adjust eclipse parameters to-xmx3072m, this error will still occur.
FIS = new FileInputStream (file);
It should be because the above method uses the DOM parsing mode, using streaming to parse large files without a memory overflow problem.
2, after Google, found the following post:
http://www.iteye.com/topic/624969
The excel2007 file format differs from the previous version by using Microsoft's own storage format. The 07 version of the content is stored in XML format, so, of course, the reading of the large data volume of xlsx file is also the XML processing method of Sax.
Using the method above, the
XMLReader parser = Xmlreaderfactory.createxmlreader ("Org.apache.xerces.parsers.SAXParser");
This sentence will appear
Java.lang.ClassNotFoundException:org.apache.xerces.parsers.SAXParser's error.
download your own xerces.jar file and it will appear when you load
Java.lang.AbstractMethodError:org.apache.xerces.dom.ElementImpl.getTextContent () ljava/lang/string error.
It seems that we can only find other ways.
3, after some Google, found the following link
Https://blogs.oracle.com/mei/entry/java_lang_classnotfoundexception_org_apache
Follow The instructions in the link above to resolve the issue by changing the code that generates XMLReader to the following method.
1 NULL ; 2 // 3//4 m_parserfactory =5 m_ Parserfactory.setnamespaceaware (true); 6 7 XMLReader parser = M_parserfactory.newsaxparser (). Getxmlreader ();
Appendix: The following links are provided throughout the process:
Java reads Excel. xlsx file POI implementation tested around 7M files no problem
Http://www.cnblogs.com/chenfool/p/3632642.html
Large data volume of the Excel file read--excel2007 (including code and samples) tested around 36M file no problem, you need to follow the above to modify the slightly.
http://www.iteye.com/topic/624969
Java.lang.AbstractMethodError:org.apache.xerces.dom.ElementImpl.getTextContent () ljava/lang/string Xerces the correct reason for causing this error is described
Http://stackoverflow.com/questions/14014989/java-lang-abstractmethoderror-org-apache-xerces-dom-elementimpl-gettextcontent
Java.lang.ClassNotFoundException:org.apache.xerces.parsers.SAXParser does not use the Xerces.jar solution
Https://blogs.oracle.com/mei/entry/java_lang_classnotfoundexception_org_apache
Java solutions for large files with excel-xlsx format