• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

XSSFWorkbook uses much more memory than HSSFWorkbook?

 
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 :-).
 
reply
    Bookmark Topic Watch Topic
  • New Topic