asp教程.net c# 读取excel数据代码
public dataset exceltods(string path)
{
string con = "provider=microsoft.jet.oledb.4.0;data source="+"e:collegemisupexcel" + fileupload1.filename+";extended properties='excel 8.0;imex=1'";
oledbconnection olecon = new oledbconnection(con);
oledbdataadapter oleda = new oledbdataadapter("select * from [sheet1$]", con);//sheet1是sheet的名字
string strexcel = "";
oledbdataadapter mycommand = null;
dataset ds = null;
//从excel的一个工作表中导入数据到数据库教程中
strexcel = "select 门牌号,用户名,用户人口数目,用户住房面积,用户取暖面积,用户电话,用户工作单位,用户数据类型 from [sheet1$]";
try
{
mycommand = new oledbdataadapter(strexcel, strconn);
ds = new dataset();
mycommand.fill(ds, "table1");
}
catch(exception e)
{
conn.close();
mycommand.dispose();
}
return ds;
}
//sheet1是sheet的名字
tplink路由器默认密码是多少(tplink路由器默认密码详解)
tplink路由器默认密码怎么查看(tplink路由器默认密码查看方法)
tplink无线路由器密码怎么重置(tplink无线路由器密码重置方法)
手机如何设置tplink无线路由器密码和密码共享功能(手机设置tplink无线路由器密码和密码共享功能方法)
tplink无线路由器密码忘记了怎么办(tplink无线路由器密码忘记了解决方案)
tplogin路由器可以无线桥接么(TPLink路由器是否支持无线桥接功能)