最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
excel数据导入到dataset代码
时间:2022-06-25 05:07:40 编辑:袖梨 来源:一聚教程网
excel数据导入到dataset代码
public dataset execleds(string filenameurl, string table)
{
string strconn = "provider=microsoft.jet.oledb.4.0;" + "data source='" + filenameurl + "';extended properties='excel 8.0; hdr=yes; imex=1'";
oledbconnection conn = new oledbconnection(strconn);
conn.open();
dataset ds = new dataset();
oledbdataadapter odda = new oledbdataadapter("select * from [sheet1$]", conn);
odda.fill(ds, table);
return ds;
}
select * from opendatasource('microsoft.jet.oledb.4.0','user id=admin;password=;data source=filenameurl;extended properties=''excel 8.0;imex=1''')...sheet1$
相关文章
- 蛋仔小游戏免费秒玩入口(云游戏版)-2026最新蛋仔派对秒玩链接免登录直达 03-07
- oppo服务中心-oppo官网首页 03-07
- z-library电子书下载-zlibrary官方入口 03-07
- 豆包AI网页搜题入口-2026豆包搜题网页版最新网址速览 03-07
- picacg哔味-极速入口 03-07
- 观影GYING官网登录-观影GYING网页版在线 03-07