I update Excel file with Decimal Value using OLE DB worked fine in asp.net.
but when i open that excel file, i found that unnecessary apostrophe added with that decimal value.
so i am not able to get accurate value in that excel file.
if any one have answer then please give me.
Update Excel File Issu
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sam HobbsRank #108 · 20.5K reputationPosted Oct 28, 2010, 1:08 PM EDT
Dhaivat Shah10 reputationPosted Oct 28, 2010, 8:19 PM EDT
decimal decValue = 5.25;
OleDbCommand objCmdinsert;
string strDestinationConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;" +
@"Data Source=c:\Test.xls;" +
@"Extended Properties=" + Convert.ToChar(34).ToString() +
@"Excel 8.0;Imex=2;HDR=NO;" + Convert.ToChar(34).ToString();
OleDbConnection objDestination = new OleDbConnection(strDestinationConnectionString);
objDestination.Open();
Updatestring = "Update [sheet1$ F1:F1] set F1=" + decValue;
objCmdinsert = new OleDbCommand(Updatestring, objDestination);
objCmdinsert.ExecuteNonQuery();
Using Above code, Excel file Updated Successfully. But when i open Excel file the decimal value converted into text.
so if any one know the solution then share their knowledge.