AutoFitRow and AutoFitColumn terribly slow!


i’m processing data from a sql database and put it into excel files for reporting purposes using aspose excel. most of the aspose-component works perfectly, but i’ve been noticing a terrible slow down in creating the files, when using the AutoFitRow (or AutoFitColumn) function for a few thousand lines in the file.

at the moment, i’m extracting the data from the database, put them into the excel file and after that, i’m walking over each line, doing AutoFitRow - it looks like this:

<BR> for (int row = 0; row < intMyRowCount; row++)<BR> {<BR> ws.AutoFitRow(row);<BR> }<BR>

this increases the time of the file creation process approximately by the rate of 10.

is there a quicker way to do “AutoFitRow”? or is there the possibility to speed up this method in the next version of Aspose.Excel?

regards and thanks in advance,
philipp from austria, europe

Hi, thanks for mentioning this issue.

In MS Excel, autofit is generally done line by line, so we’ve overlooked the performance of AutoFit method. I will investigate this problem and speed up it right now.

If possible, I will optimize it in the next hotfix. Otherwise, no later than this month. When completed, I will reply to this post. Now thanks for your patience.

Dear Philipp,

Please download Hotfix 1.8.1 and have a try.

Hi Laurence,

We are using older version of Aspose.Cells ( with the same problem (we think), and would like to apply the hot fix (1.8.1). I realize this is quite old so I am not at all sure this is the best approach, but we have been using this version without issues until now (data size has grown recently), and ideally would like to fix this problem without having to upgrade to latest version that might have other issues we don't yet know about.

What do you recommend?


Please try this fix.

And please use "Worksheet.AutoFitRows();" to fit all row height.

If you still get the problem, please post your template file.We will check it soon.

Thank you Simon, Is this the hotfix 1.8.1 specific for Aspose.cell? Also, an additional symptoms we have is that the system slowness gets worse overtime to the point where we have to reboot the system to regain back to the initital level of slowness. Does this also fit the bill for this fix?


Could you try the fix (Provided by Simon) to check if it resolves the performance and other other issues. Also, the fix is specific for although I am not completely sure about your query especially what do you mean by specific for phrase :)

Thank you.


Thanks for the quick reponse. Reason I asked about "specific for" is because I noticed the build of this DLL was, so it does not appear to be a "hotfix" for For a hotfix only patch for, I would've expected the version to be something like In anycase, we will try this fix and see if this fixes both "line-by-line" performance problem as well as "gets worse over time" issues.

Stay tuned :-)

Thanks much!

John L.


The version has fixed many bugs and supported more features since

Please post your template file, we will check it soon.