Exercise 1: Verification

In this verification, you will run the console application and observe that an Excel worksheet is opened and your account data is populated in a worksheet.

  1. In Visual Studio, press the F5 key to run the application in debug mode.
  2. Observe that the application starts an instance of Microsoft Excel and inserts your data into the first worksheet:

    Figure 1

    Account data in an Excel worksheet

    Note:
    Notice that the column widths have been adjusted to be sized based on the contents. Also notice per the logic in the for each loop of the delegate passed to the DisplayInExcel function, the account with a negative balance has a red background.

  3. Close Excel. Do not save any changes.

Next Step

Exercise 2: Embedding an Excel Worksheet in Microsoft Word