Highlighted

CFSpreadsheet fails to read atleast one row if the excel file size is big

New Here ,
Feb 28, 2017

Copy link to clipboard

Copied

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.

Views

550

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

CFSpreadsheet fails to read atleast one row if the excel file size is big

New Here ,
Feb 28, 2017

Copy link to clipboard

Copied

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.

Views

551

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 28, 2017 0
Advocate ,
Mar 01, 2017

Copy link to clipboard

Copied

How much memory on the server and how much memory is CF / JVM configured to use?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 01, 2017 0
New Here ,
Mar 01, 2017

Copy link to clipboard

Copied

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.

Server Details
Server Product ColdFusion 2016
Version 2016.0.03.300466
Tomcat Version 8.0.32.0
Edition Developer  
Operating System Windows 10  
OS Version 10.0  
Update Level C:/ColdFusion2016/cfusion/lib/updates/chf20160003.jar  
Adobe Driver Version 5.1.4 (Build 0001) 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 01, 2017 0
BKBK LATEST
Adobe Community Professional ,
Mar 06, 2017

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 06, 2017 0