| 发表于:2007-01-23 18:45:49 楼主 |
string strcon = " provider = microsoft.jet.oledb.4.0 ; data source = c:/sample.xls;extended properties=excel 8.0; "; oledbconnection oconn = new oledbconnection(strcon); string strcom = " select * from [1. tsample] "; oledbdataadapter mycommand = new oledbdataadapter(strcom, oconn); dataset ds = new dataset(); mycommand.fill(ds); error:无效的括号名称 '1. tsample '。 改为: string strcom = " select * from [1. tsample$] "; 也不行 请问这是怎么回事啊? 谢谢! |
|
|
|
|