Dear POI Users Group, Unfortunately, I found out that the latest POI library poi-ooxml with versions 4.0.1, 4.1.0 consumes much more memory than the version 3.17 when it is required to write information to already existing large Excel file. It requires approximately 6GB Java Heap Space to add these rows using poi-ooxml library with version 3.17 but it is not enough even twice more (12GB) with version 4.0.1 or 4.1.0. Besides, the performance is much worse with the latest versions of poi-ooxml. OpenJDK 11.0.02 was used to run this example. In attachment the corresponding example with ExcelWriter class can be found that tries to add only 5 rows to already existing sheet "Sheet2" having only header row with 16 columns. The first sheet "Sheet1" of this file already contains 240K rows with 23 columns. Zipped ExcelWriter with Test-Template.xslx can be downloaded from the next link: https://drive.google.com/file/d/1vq6WvMv5mSFUzyJinN9aoYRBStxZuJCq/view To run ExcelWriter main method, please specify the full path to Test-Template.xlsx and result file path. To change poi-ooxml version, it requires to change it in pom.xml, rebuild the project and run it again.
Could you please advise why it became worse comparing with the old library version poi-ooxml-3.17.jar and how it could be improved? Best regards, Kirill www.jedox.com Kirill Rajbhandary Senior Software Engineer +49 761 15147 237 Jedox AG Bismarckallee 7a 79098Freiburg im Breisgau Germany Executive Board: Florian Winterstein (Chairman), Bernd Eisenblätter, Maximilian Prinz zu Hohenlohe-Waldenburg Supervisory Board: Bernhard Wöbker (Chairman), Curt Gunsenheimer, Thilo Schmid Place of Business: Amtsgericht Freiburg HRB 702118 [TM.V06112018]