Skip to main content
Cadet | Tier 2
December 26, 2022
Solved

Unable to connect to to Excel DB

  • December 26, 2022
  • 15 replies
  • 2270 views

I am facing an issue with the Excel Database connection operation with one of the processes where repeatedly getting the error message as “Could not connect to Database. External table is not in the expected format” while trying to connect to the Master file. The same file, being able to open through Excel Advanced Open command at the same time. This issue came across only after combining all Child BOTs into the Main BOT. The issue is not facing when I run that process separately.

Best answer by Padmakumar

Hi @Padmakumar ,

 

Thanks for the response. Please find the requested details.

  • I have already installed the Microsoft Access Database Engine 2010 Redistributable 32-bit version.
  • Connection Mode - Default.
  • Connection String :

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\VEarnest\RPA Practice\Audit Expeditures.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES"

  • Yes, session names are correctly mentioned.

 

Ok. Then, kindly try after changing the Database package version in both Parent and the Child bots.

15 replies

Navigator | Tier 3
July 28, 2025

Provider=Microsoft.ACE.OLEDB.12.0;Data Source="$strTrackerFilePath$";Extended Properties="Excel 12.0 Xml;HDR=YES"

Padmakumar
Premier Pathfinder | Tier 7
Premier Pathfinder | Tier 7
July 28, 2025

Your connection string uses "Excel 12.0 Xml;HDR=YES" — try simplifying it to: 

Extended Properties="Excel 12.0;HDR=YES"

The "Xml" part can cause issues if the file isn’t strictly XML-based Excel.

 

Additionally, check the below points as well.

 

  • Corrupted File
    Use Excel’s Open and Repair feature:
    File > Open > [select file] > click dropdown next to Open > Open and Repair

  • Permissions or Read-Only Mode
    Ensure the file isn’t marked as read-only or locked by another process.

  • Driver Compatibility
    Confirm that the Microsoft Access Database Engine (ACE OLEDB 12.0) is properly installed. If not, you can download it from Microsoft.

 

Padmakumar
Cadet | Tier 2
November 13, 2025

Hi ​@Padmakumar 

I am unable to connect excel as DB, getting this error “Could not Connect to Database. Provider cannot be found. It may not be properly installed.”. I have used connection string as “Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\msour\Documents\Book1.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";” connection mode “Default”. and Microsoft Access Database Engine 2016 64 bit i have installed. when i am going to download 32 bit I am getting error my system already has office 2024 64 bit version so i can't download 32-bit database engine. and 2010 database engine is not found in Microsoft site.Thanks in Advance.

Padmakumar
Premier Pathfinder | Tier 7
Premier Pathfinder | Tier 7
November 14, 2025

Hi ​@Padmakumar 

I am unable to connect excel as DB, getting this error “Could not Connect to Database. Provider cannot be found. It may not be properly installed.”. I have used connection string as “Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\msour\Documents\Book1.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";” connection mode “Default”. and Microsoft Access Database Engine 2016 64 bit i have installed. when i am going to download 32 bit I am getting error my system already has office 2024 64 bit version so i can't download 32-bit database engine. and 2010 database engine is not found in Microsoft site.Thanks in Advance.

Your connection string targets ACE OLE DB (Microsoft.ACE.OLEDB.x), but AA (or the driver) with your Office install is a different bitness (32‑bit vs 64‑bit). If they don’t match, you get the Provider cannot be found error.



Option A—Match bitness + use ACE 16.0

  • Confirm the process bitness you run the bot with (AA Bot Agent/runner).
  • Install the same‑bit Access Database Engine (ADE) or rely on Office’s built‑in ACE (Office 2016+ ships v16).
  • Use this string (works with ADE 2016+):

Provider=Microsoft.ACE.OLEDB.16.0;Data Source=C:\Users\msour\Documents\Book1.xlsx;
Extended Properties="Excel 12.0 Xml;HDR=YES;IMEX=1";

(You can keep Excel 12.0 Xml even with ACE 16.) 


If you use Database: Connect → enable the Use ODBC 64‑bit driver when your driver is 64‑bit. 

 

Option B—Side‑by‑side install when Office blocks you
If Office 64‑bit blocks installing ADE 32‑bit (or vice‑versa), install with the /passive (or /quiet) switch to allow coexistence:
AccessDatabaseEngine.exe /passive

(or AccessDatabaseEngine_X64.exe /passive for 64‑bit). This is a known workaround used when mixed Office/ACE bitness is needed. 


Option C—Use ODBC Excel driver (skip OLE DB)
Create a DSN (matching bitness) with Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb) and connect via ODBC in AA. Several AA users fixed the same error by switching to the correct ODBC driver/bitness.

 

 

Always check the below points while using Excel as a DB:

  • The provider name matches what’s installed: Microsoft.ACE.OLEDB.16.0 (preferred) or 12.0. 
  • Bitness matches the AA process (all components 64‑bit or all 32‑bit). 
  • Use Excel 12.0 Xml;HDR=YES;IMEX=1 in Extended Properties for .xlsx.
Padmakumar
Cadet | Tier 2
December 4, 2025

Thank you So much ​@Padmakumar 

I have used your 3rd option. I have just checked “Use ODBC 64-bit driver for connection” on connection and its worked. 😊