
Untitled
By: a guest on
Jun 21st, 2012 | syntax:
None | size: 0.59 KB | hits: 9 | expires: Never
C#: Getting a cell's value with Excel.interop
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(&iResolution); //what to do here?
str_Resolution = ((string)iResolution.toString()).Replace(",",".");
str_Resolution = str_Resolution.Replace(" ","");
mObj.Str_Resolution="1";
}
var cellRangeValue = rng_ResolutionCell.get_Value(System.Type.Missing);