title: Convert Number Stored As Text To Number
body: <p>I have an Excel workbook that has column C as number stored as text.  What is the C# syntax to convert it to number?  I know that this VBA will do the job</p>
  
  <pre><code>Range("C:C").Select
  With Selection
      Selection.NumberFormat = "0.00%"
      .Value = .Value
  End With
  </code></pre>
  
  <p>And I tried this with C# - but it left the numbers stored as text.  </p>
  
  <pre><code>ExcelWorksheet ws3 = pck.Workbook.Worksheets.Add("New Sheet");
  ws3.Cells["A1"].LoadFromDataTable(tableforme, true);
  ws3.View.FreezePanes(2, 4);
  ws3.Cells["C:C"].Style.Numberformat.Format = "#,##0.00";
  ws3.Cells["C:C"].Style.Numberformat.Format = "0%";
  </code></pre>
  
  <p>What must I do in C# to convert a column that is numbers stored as text.</p>