Hi All, Below is my code to read xlsm file : byte[] filedata = attachmentValue.getFileData(); InputStream inputFileStream = new ByteArrayInputStream(filedata); //Create Workbook instance for xlsx/xls file input stream Workbook workbook = null; workbook = WorkbookFactory.create(inputFileStream); This code work well upto 5 MB. But after that throwing Out Of Memory Exception. I am using POI 3.9 jars Please suggest.
This should be covered in this FAQ Entry - http://poi.apache.org/faq.html#faq-N10109
Heap dumps are getting genarted : A Linked List Data Structure Detected. 466,985,128 bytes (51.13 %) of Java heap is used by 489,034 instances of org/apache/xmlbeans/impl/store/Xobj$ElementXobj Contains 3 types of the following objects: - 489,034 instances of javax/xml/namespace/QName holding 39,122,672 bytes - 489,035 instances of org/apache/xmlbeans/impl/store/Xobj$AttrXobj holding 43,037,568 bytes - 489,034 instances of org/apache/xmlbeans/impl/store/Locale holding 684,647,600 bytes