Free Support Forum - aspose.com

Issue in DeleteBlankRows or columns method in aspose cells

Hi,

I am using aspose cells V4.8.0.4.
I wanted to delete blank rows and columns in excel sheet. So i used oExcelSheet.Cells.DeleteBlankRows() and oExcelSheet.Cells.DeleteBlankColumns() methods. But it deletes the data in excel sheet.

Herewith i have attached sample xls file and the output xls (NFLX0049_00001850.nor.xls) file.

code snippet:
Dim oExcelBook As Workbook = New Workbook
oExcelBook.Open(strinput)
Dim inti As Int32
For inti = 0 To oExcelBook.Worksheets.Count - 1
Dim oExcelSheet As Worksheet = oExcelBook.Worksheets(inti)
oExcelSheet.UnFreezePanes()
oExcelSheet.Cells.DeleteBlankRows()
oExcelSheet.Cells.DeleteBlankColumns()
Next
oExcelBook.Save(strOutPath)

Regards,
Karthik

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

I tested your sample code and template file with attached latest version of Aspose.Cells and it works fine. Please try the attached latest version and check if it works fine for you.

Thank You & Best Regards,