We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Slow to open large xlsx file


Opening the attached file using Aspose Cells takes over 600 seconds. It takes 30 seconds to open the file in Microsoft Excel. We are using version 2.1.1.

Can you please have a look and see if you can optimize this.

Do you plan to support the loadData method for xlsx files?

Thanks and best regards,
Ulf Ekström


Well, I tested, using MS Excel to open your template xlsx file manually does take some time, so it will require certain memory to load/open the file using Aspose.Cells for Java. We will look into it if we can optimize to load the file quickly. We will get back to you soon.

Thank you.


The memory consumption is not an issue for us in this case. The JVM did not even use all of its available memory.

Most of the time is spent in the two following methods:

49.9% - com.aspose.cells.ap.h
37.9% - com.aspose.cells.ap.a

Both are called from the Rows.getRow method.

Hope this helps.

Best regards,
Ulf Ekström

Hi Ulf,

Please try the attached fix. We have made some improvements for opening such large xlsx files. Since in such xlsx file there are cells that contain plain data (without other objects such as Shapes) mainly, I am afraid, the loadData method won't be of much help/effect for improving the performance. However, if you just want to fetch and use data from the file (without other requirements such as modify and re-save the workbook, parsing formulas, ...etc.), I think you can try our LightCells APIs that work in event-driven mode. You may take following threads as reference for using LightCells:

1) https://forum.aspose.com/t/90477
2) https://forum.aspose.com/t/90383
3) <a title="blocked::https://forum.aspose.com/t/90477</font></a></div> <div>4) <a title="blocked::https://forum.aspose.com/t/94018
5) <a title="blocked::https://forum.aspose.com/t/89884</font></a><br><br><br>Thank you.<br></div>

Hi Amjad,

Thank you so much for the fix. The Workbook.open method now loads in less than 50 seconds!!

The funny thing is that (after this fix) it takes more time to load the file using LightCells than the Workbook.open method. I used the following code:

LightCells l = LightCells.getInstance(“c:/file.xlsx”, FileFormatType.EXCEL2007);

l.processWorkbook(new CellHandler() {

public boolean startSheet(int i) {
return true;

public boolean startCell(int i, int i1) {
return true;

public void process(LightCell lightCell) {
Object value = lightCell.getValue();

The good thing with LightCells is that the memory consumption goes down when I don’t need to save the visited objects.

Thanks & Best regards,
Ulf Ekström

Hi Ulf,

Thank you for pointing out the performance issue of LightCells. Please try the attached latest fix. For LightCells we have made some improvements for loading data. By our test, the time taken by LightCells is less than Workbook.open() now.

Thank You & Best Regards,



The issues you have found earlier (filed as 12238;12238) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi Amjad

I have allready large xlsx file ( greater than 20 MB ) located on harddrive. My recquirment is that I have to open the that xlsx file through java application. Pl. help me to get out of this.Normal API throw 'OutputStream encountered error during write' exception. Pl. help me.

Thank you.


Please download and try our latest version v7.0.4, set all the jars into your class path, now replace the main jar with v7.0.4.5 (latest fix: Please download: Aspose.Cells for Java v7.0.4.5.)

If you still find the issue, please zip the Excel file and attach it here, we will check your issue soon.

Thank you.