title: C# Programatically change cell format of all Excel cells to General
body: <p>As part of an ETL process I am importing data from a variety of different Excel files into a database. Before this happens I need to be able to change the cell format of all cells in an excel worksheet to be in the "General" format.</p>
  
  <p>I have made a start but I'm afraid I dont know how to progress after this:</p>
  
  <pre><code>using Excel = Microsoft.Office.Interop.Excel;
  .
  .
  .
  String FilePath = "Code to get file location from database"
  String SheetName = "Code to get SheetName from database"
  
  Excel.Application MyApp = new Excel.Application();
  MyApp.Visible = false;
  Excel.Workbook myWorkbook = MyApp.Workbooks.Open(FilePath,Type.Missing, Type.Missing, Type.Missing, Type.Missing,Type.Missing, Type.Missing, Type.Missing, Type.Missing,Type.Missing, Type.Missing, Type.Missing, Type.Missing,Type.Missing, Type.Missing);
  
  //Code here to convert all rows to data type of general and then save
  
  MyApp.Workbooks.Close();
  </code></pre>
  
  <p>Any help on this would be greatly appreciated</p>