Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 21st, 2012  |  syntax: None  |  size: 0.59 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. C#: Getting a cell's value with Excel.interop
  2. if((string)(ws_Varsheet.get_Range("L" + iIndex, "L" + iIndex).Text) != "")
  3.           {
  4.  
  5.             rng_ResolutionCell = ws_Varsheet.get_Range("L" + iIndex, "L" + iIndex);  
  6.             float iResolution;
  7.             rng_ResolutionCell.Cells.get_Value(&iResolution); //what to do here?
  8.             str_Resolution = ((string)iResolution.toString()).Replace(",",".");
  9.             str_Resolution = str_Resolution.Replace(" ","");
  10.              mObj.Str_Resolution="1";
  11.           }
  12.        
  13. var cellRangeValue = rng_ResolutionCell.get_Value(System.Type.Missing);