Connecting to Excel 2016 with ADOConnection

1.5k Views Asked by At

I would like to parse a Excel 2016 (xlsx) file from RAD Studio in Delphi language using TADOConnection. I found a similar topic for Excel 2007 (xls) but it seems that it's different in my case.

I'm using the following provider : Microsoft OLE DB Provider for ODBC Drivers

With this connection string :

DSN=Excel Files;DBQ=C:\Users\artiom\Desktop\liste1.xlsx;DefaultDir=C:\;DriverId=790;MaxBufferSize=2048;PageTimeout=5;

Without any users or password.

I'm getting an error when I test the connection :

Connection test failed due to an error while initializing the provider. Unspecified error.

The Excel file is a simple list of articles I would like to insert into a database :

> N°     Name     Price
> 2      Box      20.00
> 34     Screen   120.00

What am I missing ?

1

There are 1 best solutions below

1
Atrin Noori On

I think you can use the Jet 4.0 I used it in some of my projects and it worked fine