Connection string for excel

Hi
Can any one help me connection strings for excel. what needs to be provided in the connection string for excel. I have scenario where i need to query the excel.

I had huge data with multiple columns, i need to use filters for multiple columns and base on each filter i need to set a value for the filtered results.

Thanks for the help in advance.

Hi @rao,

Kindly check the example attached.
Main.xaml (6.8 KB)

1 Like

Can u plz attach it once more…

I am not able to sv/open it in uipath

Hi @debashishforyou,

Kindly check an example that basically works with both .xls and .xlsx files.

Excel - Execute Query.xaml (8.0 KB)

3 Likes

Hi i am getting the below error while connecting to excel as datasource ,pls help me …

thanks a lot… :slight_smile:

1 Like

Perfectly working…Thanks lot.

1 Like

the select query is not working with OLEDB

“Select * from [Sheet1$]”

this is not returning any results

Hi sanjay,

I am also getting the same error.
Were you able to solve the issue. If yes, kindly share it.

Thanks in advance.

Did you resolve it? I have the same issue.

Hi @acaciomelo ,

I am using the connection string as “Provider=Microsoft.ACE.OLEDB.12.0;Data Source=PathToExcel\Example.xlsx;Extended Properties=‘Excel 12.0 XML;HDR=YES;ReadOnly=False’” and Provider name as “System.Data.OleDb” .

But I am getting error as below :

Could you please help.

Thanks,
Akanksha

@AkankshaP try below one, it may be helpful.

“Provider=Microsoft.ACE.OLEDB.12.0;Data Source=” & ExcelPath & “;Extended Properties=‘Excel 12.0 Xml;HDR=YES;IMEX=1’;”

Hi @Manjuts90 ,

Still getting same error.

Hi @AkankshaP,

Please follow the link below and install the driver which is needed in order to work properly:

2007 Office System Driver: Data Connectivity Components.

@AkankshaP try below code once

“Provider=Microsoft.Jet.OLEDB.4.0;Data Source=” & ExcelPath & “;Extended Properties=‘Excel 8.0 Xml;HDR=YES;IMEX=1’;”