DeleteBlankColumns(options) issue when comments are present in excel sheets

HI, I wanted to delete the blank columns and rows in the excel sheet and I have used Worksheet.Cells.DeleteBlankColumns(options) and Worksheet.Cells.DeleteBlankRows(options) and Version I am using is 21.10.0 in .net5 . DeleteBlnakRows(options) is working fine but DeleteBlankColumns(options) is not working properly when comments are present, It is correctly deleting the empty columns that were present before the comments but the empty columns after the comments are not getting deleted.

Attaching the sample input and output screenshots of the excel
inputExcel.png (3.8 KB)
outputExcel.png (2.7 KB)
In the output Excel, Empty columns(C and D) after the comment in the cell B1 should get deleted but they are not getting deleted.
Could you help me with this.



Thanks for the screenshots and details.

Please notice, I am able to reproduce the issue as you mentioned. I used a sample template file (created manually in MS Excel) containing data with comment as per your screenshot for the input file. I found DeleteBlankColumns does not work properly (although DeleteBlnakRows(options) works ok) and it does not remove blank columns in b/w last data column cell and commented cell/column. I have logged a ticket with an id “CELLSNET-50694” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.


This is to inform you that we have fixed your issue now. The fix will be included in (upcoming) next release (Aspose.Cells for .NET v22.5) which is scheduled in the second week of May 2022. You will also be notified when the next version is released.

The issues you have found earlier (filed as CELLSNET-50694) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi