Hello ! I would like to access to datas (cells content) inside an excel file without openning it.
I know the solution using "CreateObject("excel.application")" and "EXCELAPP.Workbooks.Open" that opens the Excel file but I don't want to use this solution.I want to use the solution with ADODB connection.For this I have a piece of code :
Sub TestAccessConn() Dim objConn As New ADODB.Connection Dim objRS As New ADODB.Recordset 'Should do a connection with excel With objConn .Provider = "Microsoft.Jet.OLEDB.4.0" 'for 32bit app '.Provider = "Microsoft.ACE.OLEDB.12.0" 'for 64 bits app .ConnectionString = "Data Source=C:\Users\Olivier\Desktop\excel.xls;" .Open End With MsgBox objConn.Sheets("Feuil1").cells(1, 1) objConn.CloseEnd Sub
Usually, I have to install the reference Microsoft ActiveX Data Objects 2.8 Library" in the reference list (just to check) But it's not enough. I get the message "The provider has'nt be founded or is not correctly installed"My windows is windows 7 64 bits CorelDraw 2019 is 64 bit but Excel (last version) is 32 bit I become mad as I don't find what is wrong.I donn't know what to use with CorelDraw 2019 (Jet ? or Ace ?)I tried to install the MSDASQL but it's not working
There are no documentation about the Ado Connection with CorelDraw. Is it possible or not as by the past it was ? Thank you if you have an idea...