title: Changing Excel cell properties with C# using Late Binding
body: <p>I can't seem to get at the properties for individual cells in my Excel sheet.
  The function that I have creates an Excel worksheet, populates it with data from a DataSet and then prints the sheet.</p>
  
  <p>The issue that I'm having is that when I print the sheet, the formatting is all out of whack-
  the cells are too small and a lot of the information is truncated. How would I set the width of the cells and change the font?</p>
  
  <p>Here's a little snippet of what I'm working with, for your perusal:</p>
  
  <pre><code>// Add rows
  iRow = 1;
  
  foreach (DataRow row in table.Rows)
  {
      iCol = 1;
  
      foreach (DataColumn col in table.Columns)
      {
          Parameters = new Object[2];
          Parameters[0] = iRow + 1;
          Parameters[1] = iCol;
          excelCell = excelSheet.GetType().InvokeMember("Cells",
            BindingFlags.GetProperty, null, excelSheet, Parameters);
  
          Parameters = new Object[1];
          Parameters[0] = row[col.ColumnName];
          excelCell.GetType().InvokeMember("Value",
            BindingFlags.SetProperty, null, excelCell, Parameters);
  
          iCol++;
      }
      iRow++;
  }
  </code></pre>
  
  <p>There seem to be plenty of examples of how to achieve something similar with early-binding, but I must be missing something with late-binding.</p>