Free Support Forum -

Problem with ColumnAutofit after open\save

Hi, Aspose team!

We have new bug with Workbook open\save.

In the attached example you can see, that after workbook open\save simple VBA code start to work in weird way. Take a look at the texts “Output” and "Units"

After Workbook open and save using Aspose library, When VBA code like
wksPivotOutput.Range(“TableCorner”).Offset(1, 0).Resize(500, 1).ClearContents
wksPivotOutput.Range(“TableCorner”).Offset(1, 0).Resize(500 + 1, 1).Columns.AutoFit
is performed. this text became corrupted.

You can find all the details in the attached prototype.

With Best Regards,

Attached was missed.
Attaching here


Thanks for the project with template file.

I can notice the issue as you have mentioned. There is some VBA code for “Output Pivot” sheet of the template “Source.xlsm” file. i.e.
Private Sub Worksheet_Activate()
wksPivotOutput.Range(“TableCorner”).Offset(1, 0).Resize(500, 1).ClearContents
'wksPivotOutput.Range(“TableCorner”).Offset(1, 0).Resize(mkintMaxRecordsInTable + 1, 1)
wksPivotOutput.Range(“TableCorner”).Offset(1, 0).Resize(500 + 1, 1).Columns.AutoFit
End Sub

This code just auto-fits the columns for range(s) when we click on the first worksheet “Output Pivot” sheet. When I just opened and re-saved the file via Aspose.Cells APIs. Now opening the output file and clicking on the first worksheet, the controls / contents are not just auto-fitted accordingly as per the source file.

Sample code:

var workbook = new Workbook(@“e:\test2\source.xlsm”);

I have logged a ticket with an id: CELLSNET-41086 for your issue. We will look into it soon.

Thank you.


We have fixed this issue.

Please download and try this fix: Aspose.Cells for .NET v7.3.2.1 and let us know your feedback.


Could you please let me know when will the next stable release be available with this bug fix?



Thanks for your posting and using Aspose.Cells.

Yes, the next official release will contain this fix. Normally, we release official release once in a month.

So it will be released anytime in this month. We will keep you updated.

However, this is called minor fix, it’s a stable release and you can use it for production use.

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

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