The C# examples you will find further on this page work with all versions of Microsoft Excel 2021, 2019, 2016, 2013, 2010, and lower:
This example shows how to create a COM add-in for Microsoft Excel, Word and PowerPoint using Add-in Express for Office and .net. See how to add a custom ribbon, toolbar and command bar controls, create advanced task panes, handle events and more.
Download
This C# example shows how to create integrated Excel extensions containing a plugin, real-time data server
and a number of XLL add-ins (User-defined functions) in a single Visual Studio project.
Download
This code example demonstrates how to develop an XLL addin providing a sample user-defined function
allocated to a custom function category. You can find the detailed write-up of this
Excel XLL add-in project in the Add-in Express Developer Manual.
Download XLL addin
See how to create a commandbar based and a ribbon based context menu for all versions
of Microsoft Excel in one C# project.
Download
Working with Excel Object model
How to process Change, SelectionChange, and other events of the Excel Worksheet class?
This C# Excel addin shows how to use the Add-in Express Excel Worksheet Events class to process the Change event of the
worksheet.
Download
How to add PivotTables and Slicers to MS Excel programmatically
This C# Excel addin demonstrates how developers can programmatically add a pivot table and slicers to a spreadsheet.
Download PivotTables and Slicers addin
How to add sparklines and charts to MS Excel programmatically
Excel charts and sparklines enable Microsoft Office developers to provide users with more ways to visualize
their data. This sample explains how you can programmatically add sparklines and charts to Microsoft Excel.
Download Sparklines and Charts add-in
How to import contacts and appointments from Excel into Outlook and vice-versa
This code example demonstrates how to write a shared C# Excel and Outlook add-in to
import and export data from Excel to Outlook and in the reverse direction.
Download Excel to Outlook Exporter addin
How to import data from SQL databases and other sources to Excel
C# Excel add-in demos how to import SQL server and text file data into Excel using the Excel Object model
and Add-in Express for Office and .net.
Download Importing Excel Data add-in
How to work with Excel cell values, formulas and formatting
This c-sharp example shows how to manipulate cells in your Excel add-ins: how to retrieve multiple cells or selected cells,
set cell formulas, display the Insert Function dialog and change cell formatting.
Download Excel Cell Format add-in
How to make an Excel task pane visible / invisible programmatically
This Excel C# add-in demonstrates how to display your custom Advanced Excel Task Pane (ADXExcelTaskPane) using a command bar button,
or how to prevent the task pane from being shown in Excel.
Download
How to interact with several Advanced Excel Task Panes in one layout position
This C# Excel plugin shows how you can interact with several Excel task panes in one position. Click on a RadioButton
control on the Controlling Task Pane to activate the needed ADXExcelTaskPane.
Download
How to develop a context-dependent Excel task pane
The sample plugin for Excel shows how to dynamically show and hide an Advanced Excel Task Pane
depending on whether cell A1 contains some string or doesn't.
Download