C
cp0574
Unregistered / Unconfirmed
GUEST, unregistred user!
我想读取EXCEL中某些字段的记录,从首到尾,然后将这些记录保存成文本文件
我使用了Adoconnection1,Adotable1,Datasource1,Dbgrid1.
Adoconnection1的连接字符串Connect_Str为:
Connect_Str:='Provider=Microsoft.Jet.OLEDB.4.0;Mode=ReadWrite;ExtendedProperties=Excel 8.0';
Connect_Str:=Connect_Str+';Data Source='+AXLSFileName;
Connect_Str:=Connect_Str+';Persist Security Info=False';
在测试连接时,发生错误:"测试连接失败,因为初始化提供程序时发生错误,找不到可安装的ISAM."
望大家告我这是什么错误?怎么解决?注:这个连接字符串我是在全文检索后找到的.
于是我修改连接字符串Connect_Str为
Connect_Str:='Provider=MSDASQL.1;Persist Security Info=False;'+
'Extended Properties="DSN=Excel Files;DBQ='+AXLSFileName+
';MaxBufferSize=2048;PageTimeout=5;"';
这次连接测试通过!,但Dbgrid1中却只显示了XLS文件中的第一列数据,在我的XLS文件中我一共有5列数据.
这又是什么原因?怎么解决?
其他信息:winxp+delphi6+excel2000
adotable1的tabledirect设置为true,tablename为dsf(dsf是什么东西???它是怎么得到的???)
我使用了Adoconnection1,Adotable1,Datasource1,Dbgrid1.
Adoconnection1的连接字符串Connect_Str为:
Connect_Str:='Provider=Microsoft.Jet.OLEDB.4.0;Mode=ReadWrite;ExtendedProperties=Excel 8.0';
Connect_Str:=Connect_Str+';Data Source='+AXLSFileName;
Connect_Str:=Connect_Str+';Persist Security Info=False';
在测试连接时,发生错误:"测试连接失败,因为初始化提供程序时发生错误,找不到可安装的ISAM."
望大家告我这是什么错误?怎么解决?注:这个连接字符串我是在全文检索后找到的.
于是我修改连接字符串Connect_Str为
Connect_Str:='Provider=MSDASQL.1;Persist Security Info=False;'+
'Extended Properties="DSN=Excel Files;DBQ='+AXLSFileName+
';MaxBufferSize=2048;PageTimeout=5;"';
这次连接测试通过!,但Dbgrid1中却只显示了XLS文件中的第一列数据,在我的XLS文件中我一共有5列数据.
这又是什么原因?怎么解决?
其他信息:winxp+delphi6+excel2000
adotable1的tabledirect设置为true,tablename为dsf(dsf是什么东西???它是怎么得到的???)