CFSpreadsheet fails to read atleast one row if the excel file size is big. I am trying to read a excel file of size say 20mb. But it is giving java heap space error when reading the whole file. But when I specify the row attribute, it is not able to read even one row from the big file. Please help me on this issue.
How much memory on the server and how much memory is CF / JVM configured to use?
Minimum JVM Heap Size (in 256 MB) Maximum JVM Heap Size (in 1024 MB) . I am trying to do it in CF2016 developer edition. I tested it in my dev server with higher configuration as well. same behaviour.
|Adobe Driver Version
|5.1.4 (Build 0001)
Copy link to clipboard
The memory problem in cfspreadsheet has been known for some time. Most of ColdFusion's spreadsheet functionality is based on the POI library. The version of POI which ColdFusion implements is the User API. This loads the entire document into memory. That is what causes the out-of-memory error when you read a large Excel file.
I am sorry to say, I don't think there is currently any way to work around this problem in ColdFusion. Nevertheless, there are two possible solutions, in Java, also provided by Apache POI, namely its Event API or Streaming Usermodel API.