The file is opened very slow after deleteColumns() and save()


#1

Hi,

I met an issue that Excel opens very slow (20+ minutes) after Cells.deleteColumns() and Workbook.save() while the original file can be opened in seconds. Code piece,
Workbook wb = new Workbook(“CF15386.xls”);
Worksheet ws = wb.getWorksheets().get(0);
ws.getCells().deleteColumns(1, 1, true);
wb.save(“CF15386_SavedbyAspose.xls”);
Attachment:CF15386.zip (7.9 MB)

Note: I’m testing under Windows 7 64/Excel 2010/Aspose Cells Java v 19.5.5.

Thanks,
Hui


#2

@huichen,

Thanks for the template file.

I tested your scenario/ case by opening the output file into MS Excel 2003, 2007, 2010 and 2013. I found only MS Excel 2010 has an issue with opening the file into it (it takes long time to open the file into it). All other Excel versions open the file by taking a few seconds only. Could you check your issue by opening the output file into other MS Excel versions (MS Excel 2003, 2007, 2013/2016, etc.) and let us know your feedback.


#3

Hi,

I don’t have other Excel version than 2010 on hand since Excel 2010 is our main PROD version for now.

Also, if I delete column B and save in Excel 2010, the saved file can be reopened in seconds, and the file size is larger than Aspose’s.

There are another scenarios for your information.

  1. If I delete first 40 columns, the file is still slow to open, and the picture in D2 is still present. I was thinking deleteCoulmns() should delete everything.
  2. If I delete first 41 columns, the file is opened quickly, but the picture in D2 is still present.

I understand that this issue may happen only on specific Excel version(2010) and specific format(xls). Please let me know If it’s hard to fix, we can then find the workround solution.

Thanks,
Hui


#4

@huichen,
We were able to observe the issue where after deleting the column output file takes lot of time while opening in Excel but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSJAVA-42927 - Saved file opens slow in Excel after deleting columns

Regarding the image issue, if we delete 40 or 41 columns using Excel, the picture in D2 columns is not deleted, hence it does not seem to be an issue with Aspose.Cells. Please give it a try and share the feedback.


#5

Hi,

Please ignore the image issue since Excel is the same.

FYI, there isn’t much difference than other files except some hyperlinks. Not sure if it causes the issue.

Thanks,
Hui


#6

@huichen,
Regarding the hyperlinks, please exactly identify the file and explain the issue along with the images. We will reproduce the scenario here and provide assistance after analysis.


#7

@huichen,
About CELLSJAVA-42927, which tool creates this template file?
The ranges of conditional formatting should be merged. If the file is created by Aspose.Cells, please use the following codes:

SaveOptions saveOptions = new XlsSaveOptions(SaveFormat.Excel97To2003);
saveOptions.MergeAreas = true;
workbook.Save(dir + "dest.xls", saveOptions);

Let us know your feedback.


#8

Hi,

I have tried the following code and the result is the same as before,

		Workbook wb = new Workbook("CF15386.xls");
		Worksheet ws = wb.getWorksheets().get(0);
		ws.getCells().deleteColumns(0, 1, true);
		SaveOptions saveOptions = new com.aspose.cells.XlsSaveOptions(com.aspose.cells.SaveFormat.EXCEL_97_TO_2003);
		saveOptions.setMergeAreas(true);
		wb.save("CF15386_Aspose.xls", saveOptions);

Also, I just want you to be aware in my last reply that there are many hyperlinks in the file. But my latest test result shows, even if I don’t add those hyperlinks, the saved file is still very slow to open in Excel 2010.

Thanks,
Hui


#9

@huichen,
Thanks for the feedback. I was asking about creating the template file CF15386.xls that which tool is used to create this file. If it is created by Aspose.Cells then add above-mentioned code while creating this file. If it is not created using Aspose.Cells, then please share which tool is used for creating it.


#10

@huichen,

This is to inform you that we have fixed your issue (logged earlier as “CELLSJAVA-42927”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.


#11

The issues you have found earlier (filed as CELLSJAVA-42927) have been fixed in Aspose.Cells for Java 19.6. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi