在读取excel行值时,它会忽略十进制值,就像我有25.44但它只返回25

时间:2016-08-20 11:36:41

标签: c# .net oledb

System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0; Data Source={0};Extended Properties=""Text;IMEX=2;HDR=YES;FMT=Delimited""); /*for office 2003 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);

我想读45.4不仅仅是45。

0 个答案:

没有答案