且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何连接Excel 2007 for Delphi7

更新时间:2023-09-11 14:46:28

使用ADO,您可以这样设置连接字符串:

With ADO, you can set the connectionstring like this:

ConnectionString:='Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\ MyWorkBooks \ myDataBook.xls;扩展属性= Excel 8.0;';

ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyWorkBooks\myDataBook.xls;Extended Properties=Excel 8.0;';

http://delphi.about.com/od/database/l/aa090903a.htm