string strCon = " Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source = F://11.23--11.25.xls;Extended Properties=Excel 8.0";
OleDbConnection conn = new OleDbConnection(strCon);
string strCom = "SELECT * FROM [有流量网站$]";
OleDbDataAdapter da = new OleDbDataAdapter(strCom, conn);
DataSet ds = new DataSet();
da.Fill(ds, "[有流量网站$]");
conn.Close();
C#读取Excel表格
最新推荐文章于 2024-02-27 08:59:53 发布