Skip to main content
Solved

Unable to connect to to Excel DB

  • December 26, 2022
  • 14 replies
  • 1980 views

Forum|alt.badge.img+2

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.

14 replies

Padmakumar
Premier Pathfinder | Tier 7
Forum|alt.badge.img+15
  • Premier Pathfinder | Tier 7
  • December 26, 2022

Hi @vincet.earnest ,

 

Let's try with the basic things first. Please confirm the below points to give better feedback on this.

 

  • Have you installed the Microsoft Access Database Engine 2010 Redistributable driver? If yes, what is the bit version of it?
  • What is the Connection mode given?
  • What is the Connection string given?
  • Have you mentioned the Session names correctly everywhere?

Forum|alt.badge.img+2
  • Author
  • Cadet | Tier 2
  • December 26, 2022

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.

Padmakumar
Premier Pathfinder | Tier 7
Forum|alt.badge.img+15
  • Premier Pathfinder | Tier 7
  • Answer
  • December 26, 2022

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.


Forum|alt.badge.img+2
  • Author
  • Cadet | Tier 2
  • December 26, 2022

How can I do that? If you don’t mind, could you please help me with the screenshot?


Padmakumar
Premier Pathfinder | Tier 7
Forum|alt.badge.img+15
  • Premier Pathfinder | Tier 7
  • December 26, 2022

How can I do that? If you don’t mind, could you please help me with the screenshot?

 

Open the respective BOT and click the 3 dots on the top and select the Packages from the dropdown list.

 

Select the Database package from the next window and choose the Package version from it.

 

Finally, select the Change version option.

 

Hope this will help.


Forum|alt.badge.img+2
  • Author
  • Cadet | Tier 2
  • December 26, 2022

Hi @Padmakumar ,

 

Thank you for the assistance. It is working after changing the package version. 


Forum|alt.badge.img+3
  • Navigator | Tier 3
  • July 27, 2025

Hi ​@Padmakumar ,

I am also facing same issue for database connection.
Which version should i use latest one or old ones from below,
 

 


Padmakumar
Premier Pathfinder | Tier 7
Forum|alt.badge.img+15
  • Premier Pathfinder | Tier 7
  • July 28, 2025

Hi ​@Padmakumar ,

I am also facing same issue for database connection.
Which version should i use latest one or old ones from below,
 

 

 

This issue is not always related to the Action Package version. The error "External table is not in expected format" typically occurs when there is an issue with the format of the Excel file you are trying to access using the OLEDB connection.

If your Excel file contains mixed data types (e.g., text and numbers in the same column), consider adding IMEX=1 to your connection string.

 

Additionally, consider checking the below points if the above one didn’t help at all.

  1. Check File Extension: Ensure that the file extension matches the actual format of the file. If your file is saved as .xlsx, make sure it is indeed in the Excel 2007 or later format. If it is actually in a different format (like .xls), you may need to update your connection string accordingly. 

  2. Update Connection String: If you are working with an .xls file, update your connection string to use the appropriate provider:

    • For Excel 97-2003 files (.xls):
      Provider=Microsoft.OLEDB.4.0;Data Source=$sProcessFilePath$;Extended Properties="Excel 8.0;HDR=YES";
    • For Excel 2007 and later files (.xlsx):
      Provider=Microsoft.ACE.OLEDB.12.0;Data Source=$sProcessFilePath$;Extended Properties="Excel 12.0 Xml;HDR=YES;";
  3. File Integrity: Ensure that the Excel file is not corrupted. You can try opening the file in Excel and saving it again to ensure it's in the correct format.

  4. Check for Hidden Sheets or Data: Sometimes, hidden sheets or unsupported data types can cause this error. Open the file in Excel and check for any unusual formatting or hidden sheets. 

  5. Remove Unused Columns: If you added columns using the set cell action, make sure those columns do not contain incompatible data types or formatting that might confuse the OLEDB provider.


Forum|alt.badge.img+3
  • Navigator | Tier 3
  • July 28, 2025

Hi I have crossechecked all things still it is having issue to connect stage.


Padmakumar
Premier Pathfinder | Tier 7
Forum|alt.badge.img+15
  • Premier Pathfinder | Tier 7
  • July 28, 2025

Hi I have crossechecked all things still it is having issue to connect stage.

 

Please share your connection string


Forum|alt.badge.img+3
  • 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
Forum|alt.badge.img+15
  • 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.

 


Forum|alt.badge.img+1
  • 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
Forum|alt.badge.img+15
  • 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.