我的代码是:
string strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source ="d:\test.xls";Extended Properties = Excel 8.0";
OleDbConnection oleConnection = new OleDbConnection(strConnection);
try
{
string strCommondText = " SELECT * FROM [模板$] ";
oleConnection.Open();
DataSet dsRead = new DataSet();
OleDbDataAdapter oleAdper = new OleDbDataAdapter(strCommondText,oleConnection);
oleAdper.Fill(dsRead,"Pantent");
return dsRead;
}
为什么不能读取excel中的日期格式(2006-08-01)的字段的内容?如果将日期格式改为文本格式后手动再输入,就可以读取到??