Hi All,
I am limited to CF standard 9.0.2 with Java Virtual Machine Path = 1024 and -XX:MaxPermSize=512m.
In the pass i was able to fix my memory issue with -XX:-UseGCOverheadLimit, not this time.
The error "java.lang.OutOfMemoryError: Java heap space" is when it is reading and excel macro file (.xlsm) with 2,500 KB already compact using this tech:
My code is:
<!--- new file to write -->
<cfset xlsFile = createObject("java","java.io.FileOutputStream").init(filepath) />
<!--- open stream and read in excel file template --->
<cfset xlsFileTemplate = createObject("java","java.io.FileInputStream").init(filepathtemplate) />
<cfset newWorkbook = createObject("java","org.apache.poi.ss.usermodel.WorkbookFactory").create(xlsFileTemplate ) /> <!--- Error line --->
<!--- read from template to new FileOutput --->
<cfset writeableWorkbook = createObject("java","org.apache.poi.xssf.streaming.SXSSFWorkbook").init(newWorkbook,100) />
<cfset cellStyleStatic = createObject("java","org.apache.poi.xssf.usermodel.XSSFCellStyle") />
Anyone knows a better way to open xlsm file in apache poi?
Any other ideas?
Thanks in advanced.
Using new poi 3.11 beta 3.