title: C#: Getting a cell's value with Excel.interop
body: <p>I want to get the value of a cell from an excel file with a software in C#; NOT THE TEXT, because the text depend of the size of the column, and I must not change it myself, the software should not be disturbed by that. So my choice was to get the value. </p>
  
  <p>I get my cell as a range of 1:1, so I have a Range object, but Value field and Value2 field are not recognized by the language. I tried with get_Value() but it needs a parameter and I don't know what to put in it, i didn't find documentations about it. Here's my code (extracted from a loop):</p>
  
  <pre><code>  if((string)(ws_Varsheet.get_Range("L" + iIndex, "L" + iIndex).Text) != "")
    {
  
      rng_ResolutionCell = ws_Varsheet.get_Range("L" + iIndex, "L" + iIndex);   
      float iResolution;
      rng_ResolutionCell.Cells.get_Value(&amp;iResolution); //what to do here?
      str_Resolution = ((string)iResolution.toString()).Replace(",",".");
      str_Resolution = str_Resolution.Replace(" ","");
       mObj.Str_Resolution="1";
    }
  </code></pre>
  
  <p>Can you help me with that? Thanks by advance.</p>