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

Padmakumar
Premier Pathfinder | Tier 7
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?
Padmakumar
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
Premier Pathfinder | Tier 7
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.

Padmakumar
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
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.

Padmakumar
Cadet | Tier 2
December 26, 2022

Hi @Padmakumar ,

 

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

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
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.

Padmakumar
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
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

Padmakumar