Free Support Forum - aspose.com

How to access an inserted table in the excel programmatically using aspose.cell API

how to access an inserted table in the excel programmatically using aspose.cell API


This message was posted using Page2Forum from Aspose.Cells.Tables - Aspose.Cells for .NET

Hi,

See the following sample code:

Workbook workbook = new Workbook(“e:\test\1out_newlistBook.xls”);
ListObjectCollection listObjects = workbook.Worksheets[0].ListObjects;
MessageBox.Show(listObjects.Count.ToString());
//Get the first list object.
ListObject mylistobject = listObjects[0];
int list_cols = mylistobject.ListColumns.Count;


For further details how to create/manipulate list objects/tables, see the documents:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/creating-a-list-object.html
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/format-a-list-object-table.html

Thank you.