why this with excel sheet reading?
- by Lalit
Hi,
I am reading the excel sheet from c# interop services cell by cell. where as my excel sheet have Date cells. It generates some double values , I am converting them in date by :
double dbl = Convert.ToDouble(((Excel.Range)worksheet.Cells[iRowindex, colIndex_q17]).Value2);
string strDate3 = DateTime.FromOADate(dbl).ToShortDateString();
drRow[dtSourceEXLData.Columns[constants.VisualDate]] = strDate3;
ok? but some time happening the value of
((Excel.Range)worksheet.Cells[iRowindex,colIndex_q17]).Value2
getting date formate.why this is happeing? plaease guide me. it throws excepion of "input string not in correct format".why it is not generating double value like other cell of same column?