title: How to best fetch a cell value from excel using VSTO?
body: <p>I am trying to get cells from excel into csharp but not sure what's the best variable type to read it into.</p>
  <p>If I make the variable a string and the cell value is a double I get a parse error. If I make the variable double then when the cell is a string it wont work.</p>
  <p>Here's the code I am running:</p>
  <pre><code> try
   {
          string i = Globals.Sheet1.Cells[7, 7].Value;
          double num;
          if (i == null) return;
  
          if (double.TryParse(i, out num)) 
          {
               ...
          }
  }
  catch (Exception e)
  {
         MessageBox.Show(e.ToString());
  }
  </code></pre>