// Listing 14-5
using System.Reflection;
using Microsoft.Office.Interop.Excel;

class Program
{
    static void Main(string[] args)
    {
        var excelApp = new Application();
        excelApp.Visible = true;

        Workbook workBook = excelApp.Workbooks.Add(Missing.Value);
        Worksheet worksheet = (Worksheet) workBook.Worksheets[1];

        Range cell = (Range) worksheet.Cells[1, "A"];
        cell.set_Value(Missing.Value, 42);
    }
}
