Connection string for excel

excel
activities

#1

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.


#2

Hi @rao,

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


#3

Can u plz attach it once more…

I am not able to sv/open it in uipath


Convert data to excel table for filter
#4

Hi @debashishforyou,

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

Excel - Execute Query.xaml (8.0 KB)


Error connecting to database
Cannot create and populate list type System.Data.OleDb.OleDbErrorCollection.Path
Excel database connection
#5

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


#6

thanks a lot… :slight_smile:


#7

Perfectly working…Thanks lot.


#8

the select query is not working with OLEDB

“Select * from [Sheet1$]”

this is not returning any results


#9

Hi sanjay,

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

Thanks in advance.


#10

Did you resolve it? I have the same issue.


#11

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


#12

@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’;”


#13

Hi @Manjuts90 ,

Still getting same error.


#14

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.


#15

@AkankshaP try below code once

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