Microsoft Office Tutorials and References
In Depth Information
The NamedRange control
get_Range("$B$3:$F$9", missing), "AuthorBooksReport");
// Setting new style for ListObject
AuthorBookListObject.TableStyle =
Excel.XlTableStyleElementType.xlWholeTable;
}
As we can see in the following screenshot, we have added the ListObject control
and we have set a new style for it.
control
VSTO provides a new NamedRange control , which is used for representing named
ranges in an Excel worksheet. Alternatively, you could say that the NamedRange control
is the control in which a range of cells will have a unique name for identification
purposes. When drawn onto a range of cells in the worksheet, the control creates a
NamedRange object at the selected location. The NamedRange control exposes events,
and has the capability to bind with data. The range is nothing but a collection of cells in
the spreadsheet, that can be used to provide formatting and data binding.
The NamedRange control
NamedRange control
Open Visual Studio 2008 and create a new solution, as usual. Write the following
code in the Sheet1.cs file:
private void InternalStartup()
{
// BeforeDoubleClick event of the sheet
this.BeforeDoubleClick += new Microsoft.Office.Interop.Excel.
 
Search JabSto ::




Custom Search