• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

XSSFWorkbook uses much more memory than HSSFWorkbook?

 
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

My Excel file has 60,000 rows.
When I save it as filename.xls my Java can read it using HSSFWorkbook.
But if I save it as filename.xlsx and use XSSFWorkbook my Java program runs out of memory big time.

Use HSSFWorkbook it uses 300Mb memory.
Use XSSFWorkbook it runs out of memory at 1200Mb (the max allowed on my PC JVM).

Does XSSFWorkbook really use that much memory than HSSFWorkbook?

Thanks!
 
author
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not a POI user, but instinctively it makes a horrible kind of sense. The XML format used in the later case would undoubtedly be incredibly verbose. However 1200Mb still seems a little excessive :-).
 
crispy bacon. crispy tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!