How to copy from excel and paste into a web search box?


#1

Rookie needs help!

I imagine this may be covered in the forum somewhere, but I am pretty new to UiPath and need some help pronto!

I have an excel spreadsheet with values in column A which I need to copy and paste into a search box on a web portal. I then need to copy and paste the text that appears on screen into column C and repeat this process, working down the rows of column A.

Could anyone help? Or point me in the right direction?

Much appreciated
Liam


#2

Use excel application scope and read excel through read range activity.

This will give you excel data in for of a DataTable. Now use for each loop for data table and use Get Row Item give the index or column name to get the value or you can simply type row(“ColumnName”).ToString to get value.

Store this value in a variable, Use Open Browser activity to open the browser then use Type Into activity and hit enter to search or click search button.

See this sample structure -

Main.xaml (11.2 KB)


#3

@prankurjoshi
Thanks for the timely response. I appreciate the help.

A bit confused by the sample structure you have provided (major rookie). In the For Each Row section I have entered foreach row in “here I have typed the column name” which produces a compiling error value of type ‘string’ cannot be converted to ‘system.data.data table’

Then how do I store this value as a variable to search in browser?

Any help would be appreciated.

Thanks


#4

@Lwhite Follow below link and download the file you can get the solution


#5

Hi @Lwhite,

To copy the data in the excel sheet. you can use the below activity.

Regards
Balamurugan.S


#6

Hi @Lwhite, I have the same error. Did you manage to fix it? Can you please share the xaml file? It’s much appreciated.

Thank you!


#7

Hi Alina,

What is the issue you are facing? Can you brief it so that I will try to provide some help.

Thanks,
Hari


#8

Hi Hari,

I am trying to copy data from an excel into a webpage, click search and then copy it back to excel.
I have created a data table variable for my database and when I try to include it in Assign I get this error:
Complier error: Option Strict on disallows implicit conversions from ‘Object’ to 'System.Data.DataTable"


#9

Let me assume an example
1.We have an excel and the data in first column which we need to search in web.
so use the read range( workbook) activity and copy it to a data table and use for each row and inside the for each search the webpage and input for search you give it as row(0).tostring
2. I did not understand what you want to write back to Excel is it the output of the search or what ?
or you can share your XAML so that I can check what is wrong or give me full requirement I can give sample code.

coming to above screen shot the error is that word is a datatable and the row("") will give you a string data type. so you assign copy, if you want to write to data table use add data row activity.


#10

Yes, correct I have an excel with one column of data that I need to search in a webpage and copy the output of the search back into Excel - I attach the Xaml file (it’s not complete).

Thanks!

Main (2).xaml (11.1 KB)


#11

@Alina_Ungurean Is it possible to share excel sheet and url


#12

Hi,

Please find the below xaml and add your remaining code and run the program, let me know if you have any doubtss.
Main3.xaml (10.7 KB)

Regards,
Hari


#13

Many thanks!!


#14

Hello!

I need the bot to automatically read the data from Excel and paste it into the web page, search and copy output back to excel. For now I used command “type into” and I have to manually type the search word, not sure how I can make it to automatically read Excel. Can you please help?
Thanks!

Main_D.xaml (15.6 KB)


#15

Can you please share the link where bot needs to search and also the excel file which has the inputs. if it is confidential you can share via message.

Thanks,
Hari


#16

Hi Hari,

Webpage is http://dle.rae.es/?w=diccionario, it should search in the grey window with the small keyboard in the right side and press “consultar”. I attach Excel, I only need the first search result that it gets (after 1.)
Many thanks
Book4.xlsx (12.3 KB)


#17

Hi Alina,

Please find the attached worflow and the result will be stored in sheet3
let me know if you don’t understand.Search.zip (42.5 KB)