[BugReport] .AutoFitColumns() on WorkSheet extremely slow when columns have a NumberFormat

The subject says it all. I’m using Aspose.Cells for .NET v6.0.1.0 (the most current version I think). I’ve attached a Visual Studio 2010 console project written in VB.NET that demonstrates the problem. It fills a worksheet full of data and autofits the columns. Then it applies a NumberFormat to those columns and autofits them again. Here’s an example of the output that I get:

# of rows: 2350
# of cols: 145
# of cells: 340750

AutoFitting columns (before setting NumberFormat)… 2130 ms
AutoFitting columns (before setting NumberFormat)… 2497 ms
AutoFitting columns (before setting NumberFormat)… 2710 ms

AutoFitting columns (after setting NumberFormat)… 22226 ms
AutoFitting columns (after setting NumberFormat)… 20801 ms
AutoFitting columns (after setting NumberFormat)… 22597 ms

Press any key to continue . . .

Excel 2010 can autofit all the columns almost instantly, both with and without a NumberFormat set. Is there something you guys can do to speed this up? 20+ seconds is much too long to wait for something Excel does almost instantly and it has become a big problem for my customers.

Thank you for your help!

Hi,


Well, Auto-Fit Rows/Columns are time consuming functions if there is large amount of formatted data. I have tested your project and can notice the performance of the features. Anyways, I have logged a ticket for it with an id: CELLSNET-29983. We will look into it if we can improve the performance of the features a bit, we will get back to you soon.

thank you.

Thank you!

Hi,

Please try this fix:
Aspose.Cells
for .NET v6.0.1.9

Good improvement! Here are the times that I’m getting now:

# of rows: 2350
# of cols: 145
# of cells: 340750

AutoFitting columns (before setting NumberFormat)… 1684 ms
AutoFitting columns (before setting NumberFormat)… 2020 ms
AutoFitting columns (before setting NumberFormat)… 2137 ms

AutoFitting columns (after setting NumberFormat)… 3889 ms
AutoFitting columns (after setting NumberFormat)… 4162 ms
AutoFitting columns (after setting NumberFormat)… 3979 ms

Press any key to continue . . .


Thanks again!

Hi,

Thanks for testing the performance and sharing the results. Thanks for your appreciation.

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


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