VB.NET Excel examples
On this page you will find a set of HowTo samples that can help you to get started with Excel add-in development:
And here are a few more VB.NET examples for other applications of the Microsoft Office suite:
How to develop a COM add-in for Microsoft Office (Excel, Word and PowerPoint)
This sample shared COM add-in for Excel, Word and PowerPoint shows how you can use
Add-in Express for Office and .net to add custom command bars and command
bar controls, place new controls onto Office Ribbon tabs, create custom task panes, handle
application-level events and more.
How to customize Microsoft Excel ribbon and toolbar
See how to create custom ribbons and toolbars for Excel and how to integrate with an existing Excel tab.
How to customize Excel main menu, context menus and Backstage view
VB.NET sample shows how to create a custom context menu, add your own Backstage view item, customize the main menu in Excel 2003 - 2000.
Working with Excel Object model
How to handle the WorkbookBeforeSave event
If you develop a COM add-in for Microsoft Excel 2021 - 2000, you may find this VB.NET example useful.
How to create a custom event when Excel calculation mode changes
This VB.NET Excel addin example provides a solution for missing event that should occur then the user changes the calculation
How to find the last used cell (row or column) in Excel
This Visual Basic sample explains some reliable methods for finding the last used cell in an Excel worksheet or a range.
How to populate Excel workbooks and ranges with arrays
VB.NET code example shows how to use arrays to populate Excel with data; how to fill array with
a query or range and insert into a worksheet, and more.
How to work with Excel tables & ranges using VB.NET
This sample Excel addin demonstrates how work with tables and ranges: create a new table or a range, insert a column or a row,
sort, filter and more.
How to work with Excel pivot tables
VB.NET code example shows how to automate pivot tables in Excel: create a PivotTable, add calculated fields,
display or hide a field; delete, refresh or clear a pivot table; create a pivot chart and more.
How to show and hide Excel Task Panes programmatically
This Visual Basic .NET Excel sample demonstrates how to set the visibility
of an advanced task pane to make it show up from the command bar.
How to switch between several task panes programmatically
This addin shows how you can use several custom task panes in one position and switch between them programmatically.
How to show an advanced Excel task pane dynamically
The Excel VB.NET add-in shows how to build a context-dependent custom task pane.
The plug-in shows a task pane when cell A1 contains any value.
How to re-size an Excel task pane in VB.NET
This Visual Basic .NET example shows how you can resize your custom form using
Advanced Task Panes for Excel.
To change the form size programmatically, you set the splitter to none. Otherwise, only the user can resize the
task pane using the splitter.
This sample project demonstrates how you can build an XLL addin in Visual Studio.
You can find a detail description of this example in the Developer's Guide:
How to create an XLL add-in.