Insert Excel data to Access DB issue

Hello,

I am trying to insert my excel data into an access database but getting this error when trying to read my excel data AFTER establishing my database connection:
"Read Range Workbook: The process cannot access the file ‘*Data\Output\Log_11.07.2023 10.43.14.xlsx’ because it is being used by another process.

My connections string looks like this:
“Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, .xlsb)};dbq=\Data\Output\Log_11.07.2023 10.43.14.xlsx;defaultdir=Data\Output;driverid=1046;fil=excel 12.0;filedsn=\Excel file.dsn;maxbuffersize=2048;maxscanrows=8;pagetimeout=5;readonly=0;safetransactions=0;threads=3;uid=admin;usercommitsync=Yes”

@m.soto

This error usually occurs if your excel file is opened.

Close your Log_11.07.2023 10.43.14.xlsx file and then try.

I did it, and not only that… I am killing Excel process right before reading the file and still have same issue

Try read range first & then connect to db. Also try to use modern activity for reading the Excel.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.