| 发表于:2007-05-30 18:04:348楼 得分:0 |
ok 解决了 这样 public dataset exceltods(string path) { string strconn = "provider=microsoft.jet.oledb.4.0; " + "data source= "+ path + "; "+ "extended properties=excel 8.0; "; oledbconnection conn = new oledbconnection(strconn); conn.open(); string strexcel = " "; oledbdataadapter mycommand = null; strexcel= "select * from [技術者経歴書$] "; mycommand = new oledbdataadapter(strexcel, strconn); dataset ds = new dataset(); mycommand.fill(ds, "data "); conn.close(); return ds; } | | |
|