Use excel as Database

Hi,

I want to use Excel as Database. But the excel input files can be in .xls or .xlsx format

  1. Please help me in creating connection string that can work for both .xls and .xlsx file?
  2. Also, what would be the Provider name?
1 Like

To use Excel as a database in UiPath, you can create a connection string that is compatible with both .xls and .xlsx file formats. Additionally, you will need to specify the correct provider name. The connection string and provider name can be configured as follows:

1.Connection String for Excel Files:

You can use the “Microsoft.ACE.OLEDB.12.0” provider, which works for both .xls and .xlsx file formats. The key to making it work with both file formats is to specify the appropriate “Extended Properties” in the connection string.

Here’s a sample connection string for Excel:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Your\Path\To\Your\File.xlsx;Extended Properties=‘Excel 12.0 Xml;HDR=Yes;’;

Note : - In this connection string, replace "C:\Your\Path\To\Your\File.xlsx" with the path to your Excel file.

2.Provider Name:

  • Provider Name: Microsoft.ACE.OLEDB.12.0

To make it work with both .xls and .xlsx files, you can use the same connection string with the appropriate “Extended Properties” as described above. UiPath will handle the connection to the Excel file and allow you to perform various database operations on it, such as reading, writing, or updating data.

@garimavarshney9

Hi

Here you go with the reference from UiPath knowledge base to get his resolved

Video demo

Hope this helps

Cheers @garimavarshney9

1 Like