Hi, I am able to read the excel sheet from c# + asp.net application with MS interop Excel services (namespace). Data retrieving fine. But my excel sheet have a colummn whose formate type is of hh:mm:ss type. while retriving data i found value of this column fetching as General column getting some 0.45645646... like value. What should this problem is. rewind that in Excel sheet column formate is Custom as hh:mm:ss type as per requirement. Please guide .
+1
A:
Your question is not clear.
Do you want to set the number format to "hh:mm:ss"? If so you can do:
worksheet.Cells["A1"].NumberFormat = "hh:mm:ss";
Do you want to get the formatted value of the cell as a string?
string formattedValue = worksheet.Cells["A1"].Text;
If it is something else, please try to make your question clearer.
Joe Erickson
2010-02-19 22:17:16