W
walimg
Unregistered / Unconfirmed
GUEST, unregistred user!
select * FROM OpenDataSource('Microsoft.Jet.OLEDB.4.0','Data Source="E:/11.xls";Extended Properties="Excel 5.0;HDR=Yes;";Persist Security Info=False')...sheet$ <br>注:sheet是 Excel 的表名.<br>----------------上面这一句是指定文件和表名,测试成功--------------------<br>' select * into [' + tbname.Text + '] FROM OpenDataSource(''Microsoft.Jet.OLEDB.4.0'',''Data Source="' + excelDir.Text + '";Extended Properties="Excel 5.0;HDR=Yes;";Persist Security Info=False'')...' + Sheet.Text + '$'<br>----------------上面这一句是动态指定文件和动态表名,测试成功--------------------<br>问题:如果Excel表名是:2006-08-15sheet<br>那么将有异常,忘高手相助。感谢各位。