Microsoft Office Tutorials and References
In Depth Information
The ListObject control
// Gets the cells that define the data to be charted.
Excel.Range AuthorChartRange = this.get_Range("B1", "D5");
// Adding data source to the chart control
AuthorBookInfo.SetSourceData(AuthorChartRange, missing);
The following screenshot shows the results of adding and executing the
preceding code:
ListObject is a control that holds the data as a list that exposes events. The
ListObject control has the capability to perform complex data binding with
different data sources. The ListObject control helps you to build a formatted
visual data representation for the user. Let's take a look at an example:
The ListObject control
ListObject control
Open Visual Studio 2008 and create a new solution, as usual. Write the following
code in the Sheet1.cs file:
private void Sheet2_Startup(object sender, System.EventArgs e)
// ListObject is initialized
Microsoft.Office.Tools.Excel.ListObject AuthorBookListObject;
// Adding the ListObject control to the sheet
AuthorBookListObject = this.Controls.AddListObject(this.
Search JabSto ::

Custom Search