[Requested Feature] ListObject Add and Delete Rows

Hi Everyone,

I am currently working with the latest version of Aspose.

I have a requested feature: Could you add some methods to the ListObject class to easily add and remove the rows of a ListObject ?

Excel has this feature: when you right click on a ListObject, you can add and delete rows of the active ListObject. I would like to have this feature with the same behavior than Excel.


If you need further details, do not hesitate to ask.

Thanks in advance for the answer and Many thanks to the Aspose Team for the great job !

Best Regards,
Louis.

Hi,

I think you may try to use Cells.InsertRow(s) API if it fits your needs, see the topic for reference:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/insertingdeleting-rows-and-columns.html

Thank you.

Hi,

No it does not fit my need because if two listobjects are on the same row, the insertRow method will insert row on both listobjects.

What I mainly need is a method to delete a row for a specific listobject, not an entire row. If two listobjects are on the same row, I want to have a method to delete a row for only one listobject without any consequences for the row.

Best Regards,
Louis.


Hi,


I have logged your requested feature into our issue tracking system with an id: CELLSNET-30331. We will look into soon.

Thank you.

Hi,

Please download: Aspose.Cells for .NET v7.0.0.3

Please try Cells.InsertRange and Cells.DeleteRange.

C#



Workbook wk = new Workbook(@“D:\FileTemp\Book1.xlsx”);


Aspose.Cells.Tables.ListObject listObject = wk.Worksheets[0].ListObjects[0];


CellArea ca = new CellArea();


ca.StartRow = listObject.StartRow + 1;


ca.EndRow = ca.StartRow;


ca.StartColumn = listObject.StartColumn;


ca.EndColumn = listObject.EndColumn;


wk.Worksheets[0].Cells.DeleteRange(ca.StartRow, ca.StartColumn, ca.EndRow, ca.EndColumn, ShiftType.Up);


wk.Save(@“D:\FileTemp\dest.xlsx”);


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


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