I was trying to read an excel file in Coldfusion using the below code , but I got the following error.
<cfspreadsheet action="read" src="TestData.xlsx" sheet="1" rows="2-3" query="excelData">
Java heap space The specific sequence of files included or processed is: /mnt/cfcontent/icfinstance/cet/ceg_v2/readExcel.cfm, line: 5 "
java.lang.OutOfMemoryError: Java heap space.
Any one have any idea about this. Your help is well appreciated.
Thanks in advance
Is it a formatted xlsx? Can you test with xls?
Sounds like you tried to read a multi-GB file completely into memory.
Adam Cameron recently posted a similar instance and shows how reading the data in bits might be a better solution: