When reading excel string value, it ignores decimal values ββlike 45.4, it reads as only 45
when reading excel row value it ignores decimal values ββlike 45.4 which only counts 45. this is my code
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source = " + strFileName + "; Extended Properties = \"Excel 8.0;HDR=NO;IMEX=2\";"); /*for office 2007 connection*/
conn.Open();
string strQuery = "SELECT * FROM [" + Table + "]";
System.Data.OleDb.OleDbDataAdapter adapter = new System.Data.OleDb.OleDbDataAdapter(strQuery, conn);
System.Data.DataTable ExcelToDataTable = new System.Data.DataTable();
adapter.Fill(ExcelToDataTable);
I want to read like 45.4 not only 45. please help?
+3
source to share
No one has answered this question yet
Check out similar questions: