How can I delete rows from a listobject

When I insert rows, the listobject expands but when I deleterows it doesn't shrink??? Please advise.

Thanks!

License lic = new License();

lic.SetLicense("Aspose.Cells.lic");

Workbook wkb = new Workbook();

wkb.Open("source1.xlsx", FileFormatType.Excel2007Xlsx);

Worksheet wks = wkb.Worksheets["sheet1"];

Cells cells = wks.Cells;

cells.InsertRows(1, 5, true);

cells.DeleteRows(1, 5, true);

wkb.Save("target1.xlsx", FileFormatType.Excel2007Xlsx);

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

We have found your mentioned issue after an initial test. We will look into it and get back to you soon. Your issue has been registered in our internal issue tracking system with issue id: CELLSNET-15937.

Thank You & Best Regards,

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

Please try the attached latest version of Aspose.Cells. We have fixed your reported issue.


Thank You & Best Regards,

when I delete all the rows in the table I get an error when i try to open the resultant workbook

License lic = new License();

lic.SetLicense("Aspose.Cells.lic");

Workbook wkb = new Workbook();

wkb.Open("source1.xlsx", FileFormatType.Excel2007Xlsx);

Worksheet wks = wkb.Worksheets["sheet1"];

Cells cells = wks.Cells;

cells.DeleteRows(1, 2, true);

wkb.Save("target1.xlsx", FileFormatType.Excel2007Xlsx);

if I do the same thing in excel it automatically adds a single blank row

please advise

alan

Hi Alan,

Thanks for your sample code.

We have found the issue as you have mentioned, we will figure it out soon. I have re-opened the issue again. We will inform you when it is sorted out perfectly.

Thank you.

Hi,

Please try the attached version, we have fixed the issue.

Thank you.