

Method Add has an optional parameter for specifying a particular template.

To declare a method that exports account information to ExcelĪdd the following method to the Program class to set up an Excel worksheet. public class AccountĪdd the following code to the Main method to create a bankAccounts list that contains two accounts. Paste the following class definition into Program.cs, under the Program class. In Solution Explorer, right-click the Program.cs file and then click View Code.Īdd the following using directives to the top of the code file: using Excel =
#Microsoft word 15.0 object library location install
See How to: Install Office Primary Interop Assemblies. If you do not see the assemblies, you may need to ensure they are installed and displayed. On the Assemblies page, select in the Component Name list, and then hold down the CTRL key and select. In Solution Explorer, right-click your project's name and then click Add Reference. The new project appears in Solution Explorer. Type a name for your project in the Name field. In the Templates pane, click Console Application. NET Framework 4 (or later version) is selected as a target framework. Look at the top of the New Project dialog box to make sure that. In the Installed Templates pane, expand Visual C#, and then click Windows. On the File menu, point to New, and then click Project. For more information, see Personalizing the IDE. The Visual Studio edition that you have and the settings that you use determine these elements. Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions.
