Convert Excel to HTML (61812)

src.zip (1.6 KB)

the source file is http()s://filebin.net/vt4hbgz2uhq4mftv
you can remove () to get it!
convert can not finish!

@hucq_landray_com_cn,

After an initial test, I am able to observe the issue as you mentioned by using your sample code with your template file. I found that program keeps executing. I have logged a ticket with an id “CELLSJAVA-42741” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

@hucq_landray_com_cn,

We have analyzed this issue and following are the observations.

It is because there are two many rows/cells in the third sheet “乔木”(total 65536 rows of data) and so large data set dose need lots of time for the process. In fact most of those rows are blank, so you may remove them before the conversion. For the code in ExcelDemo.java:

Cells cells2 = worksheet.getCells();
cells2.deleteBlankRows(); //remove blank rows for rendering
Cell cell2 = cells2.get("A6");
Style style2 = cell2.getStyle();
...
excel.getWorksheets().get(2).getCells().deleteBlankRows(); //remove blank rows for saving
excel.save(new FileOutputStream(new File(sourceFileDirFile, "pageResult" + i + ".html")), saveOptions); 

For your convenience I have modified the ExcelDemo.Java which is attached here. Please check the code with the comments “NOTE THIS LINE” and provide your feedback after running this modified code.

ExcelDemo-Modified.zip (1.7 KB)