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,
Also:
newWS = (Microsoft.Office.Interop.Excel.Worksheet)newWB.Worksheets[2]; newWS.Select(); string ExcelCellContent = (string)newWS.Cells[2, 1].Value2;
Usage:
if((string)(ws_Varsheet.Cells[x, y].Value2 != "") { // process }