what is connection string to load excel 2019 file in delphi 7
The connection string to load an Excel 2019 file in Delphi 7 would depend on the method being used to access the file. Here are a few examples:
- Using ADO:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\path\to\file.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";
- Using ODBC:
Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\path\to\file.xlsx;DefaultDir=C:\path\to\;DriverId=1046;MaxBufferSize=2048;PageTimeout=5;
- Using Excel Automation:
ExcelApp := CreateOleObject('Excel.Application');
ExcelApp.Workbooks.Open('C:\path\to\file.xlsx');
Note that in order to use the first two methods, you may need to install the Microsoft Access Database Engine (for ADO) or the Microsoft Excel ODBC driver (for ODBC) on your machine
原文地址: https://www.cveoy.top/t/topic/dymg 著作权归作者所有。请勿转载和采集!