connectstring:
Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;
Data Source=F:/Leewei/Books/Delphi5/Book3/ADODemos/Excel/forcast.xls;Mode=Share Deny None;Extended Properties=Excel 8.0;
Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB
atabase Password="";
Jet OLEDB:Engine Type=35;Jet OLEDB
atabase Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;
Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:
Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB
on't Copy Locale on Compact=False;
Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False
用adotable,直接设置adotable.tabledirect:=true,就可以了。
或者在excel中选择所需数据设置一个名称作为一个表名。