Hi Naomi,
Finally got it to accept the values but I had to do it this way (see below). The one call to setting the connection string just would not work.
cFileName = ALLTRIM(GETFILE('XLS', 'Select Excel file', 'Open', 0, 'Open XLS file for import'))
oXLSConnect = CREATEOBJECT('adodb.connection')
WITH oXLSConnect
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("Extended Properties").Value = "Excel 8.0;HDR=Yes;IMEX=1"
.Properties("Data Source").Value = cFileName
.Open
ENDWITH
Regards,
Arriyel
>This one always prompts me for Data Source.
>
>>Hi Naomi,
>>
>>I have that one working too. I use that one to extract the sheet names.
>>
>>I use the other because I need the 'Extended Properties' to get around the PRB: Excel Values Returned as NULL Using DAO OpenRecordset (Microsoft Knowledge Base: 194124 (
http://support.microsoft.com/kb/194124/EN-US/)). See also
http://support.microsoft.com/kb/257819.
>>
>>Regards,
>>Arriyel
>>
Speak using soft and sweet words in case you have to eat them later.