![]() Optional parameters enable you to omit the argument for that parameter if you want to use the parameter's default value. Method Add has an optional parameter for specifying a particular template.void DisplayInExcel(IEnumerable accounts,Į() The method sets up an Excel workbook and exports data to it. In the same file, add the following method to the ThisAddIn class. The list declarations use collection initializers. To create a bankAccounts list that contains two accounts, add the following code to the ThisAddIn_Startup method in ThisAddIn.cs. The class definitions use auto-implemented properties. Replace the definition of the Account class with the following code. In Solution Explorer, right-click your project's name, select Add, and then select Class. Add the following using directives (C#) to the top of the code file if they aren't already present. In Solution Explorer, right-click the ThisAddIn.cs file and then select View Code. If you don't see the assemblies, you may need to install them (see How to: Install Office Primary Interop Assemblies).Īdd necessary Imports statements or using directives 0.0.0 (for a key to the Office product version numbers, see Microsoft Versions), in the Component Name list, and then hold down the CTRL key and select, version. ![]() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |