You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by sekhar <cs...@gmail.com> on 2013/05/24 11:56:53 UTC

OutOfMemory Error while importing XLSM excel file

Hi ,

when I am trying to read the XLSM excel file using XSSFWorkBook I got the
following error.

here is my code and exception
CP5733_Off_4241_IT_T_Q1_2013-14_34126.xlsm
<http://apache-poi.1045710.n5.nabble.com/file/n5712760/CP5733_Off_4241_IT_T_Q1_2013-14_34126.xlsm>  
XSSFWorkbook wb=new XSSFWorkbook(is);  // I am using Inputstream as input to
XSSF

I tried with OPCP package also.the result is same.

Please suggest me to get it sort.I am adding the file also.

Caused by: java.lang.OutOfMemoryError: Java heap space
	at org.apache.xmlbeans.impl.store.CharUtil.allocate(CharUtil.java:397)
	at org.apache.xmlbeans.impl.store.CharUtil.saveChars(CharUtil.java:441)
	at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.text(Cur.java:2922)
	at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.xmlns(Cur.java:3023)
	at
org.apache.xmlbeans.impl.store.Locale$SaxHandler.startElement(Locale.java:3213)
	at
org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportStartTag(Piccolo.java:1082)
	at
org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yylex(PiccoloLexer.java:4957)
	at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yylex(Piccolo.java:1290)
	at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yyparse(Piccolo.java:1400)
	at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:714)
	at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3439)
	at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1270)
	at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1257)
	at
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
	at
org.openxmlformats.schemas.spreadsheetml.x2006.main.WorksheetDocument$Factory.parse(Unknown
Source)
	at org.apache.poi.xssf.usermodel.XSSFSheet.read(XSSFSheet.java:138)
	at
org.apache.poi.xssf.usermodel.XSSFSheet.onDocumentRead(XSSFSheet.java:130)
	at
org.apache.poi.xssf.usermodel.XSSFWorkbook.onDocumentRead(XSSFWorkbook.java:286)
	at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:159)
	at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:207)
	at
com.alstom.hpr.manager.excel.impl.type.XlsImport.importFile(XlsImport.java:46)
	at
com.alstom.hpr.manager.excel.impl.BaseExcelManagement.importFile(BaseExcelManagement.java:91)
	at
com.alstom.hpr.struts.imports.ImportFinUnitDataAction.importFile(ImportFinUnitDataAction.java:183)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
	at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
	at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
	at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/OutOfMemory-Error-while-importing-XLSM-excel-file-tp5712760.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org