问题
I have been using the User model of POI API for reading excel files(.xlsx) until I encountered the out of memory(GC Overhead) exception as I was processing a pretty big file.
Upon some analysis, I was suggested to use the Event model(XSSF SAX Event API) rather of the same POI API. The problem is I am unable to understand the howto of this API by reading the docs. I did not have any problem while trying to understand the User model which I am using now. I know this Event model requires some understanding of the low lying mechanism of how these files are stored as the docs itself states:
This is intended for intermediate developers who are willing to learn a little bit of low level structure of .xlsx files, and who are happy processing XML in java. Its relatively simple to use, but requires a basic understanding of the file structure. The advantage provided is that you can read a XLSX file with a relatively small memory footprint.
Unforfortunately I dont have that level of understanding of excel files or the API and dont know where and how to start either.
Any help would be highly appreciated.
来源:https://stackoverflow.com/questions/57512192/unable-to-understand-even-model-of-poi-api-for-reading-excel-files-xlsx