ListObject

Overview

ListObject is a class in Aspose.Cells FOSS for .NET.

Represents an Excel table (structured reference / ListObject). Tables provide structured data with built-in filtering, sorting, and styling. They automatically create filters for table headers and support various table styles. Tables can include header rows, total rows, and banding for better readability. Structured references allow you to reference table data by name in formulas. var workbook = new Workbook(); var worksheet = workbook.Worksheets[0]; // Add sample data worksheet.Cells[“A1”].PutValue(“Name”); worksheet.Cells[“B1”].PutValue(“Age”); worksheet.Cells[“A2”].PutValue(“Alice”); worksheet.Cells[“B2”].PutValue(30); // Create a table int tableIndex = worksheet.ListObjects.Add(0, 0, 2, 1, true); var table = worksheet.ListObjects[tableIndex]; table.DisplayName = “People Data”; table.ShowHeaderRow = true;

This class provides 4 methods for working with ListObject objects in .NET programs. Available methods include: ConvertToRange, RemoveAutoFilter, Resize, ShowAutoFilter. All exported members are accessible to any .NET application after installing the Aspose.Cells FOSS for .NET package. Properties: Comment, DisplayName, EndColumn, EndRow, ListColumns, ShowHeaderRow, and 9 more.

Description

ListObject is a class in the Aspose.Cells FOSS library for .NET that exposes 4 methods and 15 properties for programmatic use.

The class also provides the StartRow property (gets the start row), the StartColumn property (gets the start column), the EndRow property (gets the end row).

Properties

NameTypeAccessDescription
DisplayNamestringRead/WriteGets or sets the display name.
CommentstringRead/WriteGets or sets the comment.
StartRowintReadGets the start row.
StartColumnintReadGets the start column.
EndRowintReadGets the end row.
EndColumnintReadGets the end column.
ShowHeaderRowboolRead/WriteGets or sets the show header row.
ShowTotalsboolRead/WriteGets or sets the show totals.
TableStyleTypeTableStyleTypeRead/WriteGets or sets the table style type.
TableStyleNamestringRead/WriteGets or sets the table style name.
ShowTableStyleFirstColumnboolRead/WriteGets or sets the show table style first column.
ShowTableStyleLastColumnboolRead/WriteGets or sets the show table style last column.
ShowTableStyleRowStripesboolRead/WriteGets or sets the show table style row stripes.
ShowTableStyleColumnStripesboolRead/WriteGets or sets the show table style column stripes.
ListColumnsListColumnCollectionReadGets the list columns.

Methods

SignatureDescription
Resize(startRow: int, startColumn: int, endRow: int, endColumn: int, hasHeaders: bool)Resizes the table to the specified range, rebuilding columns from header cells.
ShowAutoFilter()Shows the autoFilter drop-down buttons on the table header row.
RemoveAutoFilter()Hides the autoFilter drop-down buttons from the table header row.
ConvertToRange()Removes the table structure, leaving the cell data in place.

See Also