How to Automate Data

Hi,
How can i take input from excel column and then search each cell in web(google) and then save back data to excel.

Eg: Let’s just say i have names of cities in column if i want coordinates of those cities
google provides coordinates directly when we type city name + coordinates
and i want those coordinates gets saved back to excel

1 Like

Are you able to extract the information from google using UiPath automation?
If yes, it’s doable

Fine
Hope these steps could help you resolve this
—use a excel application scope and pass the file path as input
—inside the scope use a read range activity and get the output with a variable of type datatable named outdt
—then use a for each row loop and pass the datatable variable obtained above a string input and inside the loop use a open browser activity
—pass the url where you want to search in the url property and the browser type either chrome or internet explorer along the open browser activity
—inside the open browser use a click activity to click in the search button and use a type into activity and pass the input as row(“yourcolumnname”).ToString along with any strings concatenated so that it will search for the for the result in google
— is use GET TEXT activity and get the result with a string variable as output named out_text
Or
We can use screen scrapping method from design tab in the studio and get the output with a variable of type string
—now use a assign activity and mention like this
row(“yourcolumnname”) = out_text.Tostring

Now this will add this string obtained to the column we want to be there in the excel

Simple isn’t it
Hope this would help you
Kindly try this and let know for any queries or clarification

Cheers @Phani_Kumar_Reddy

2 Likes

1 !

3

1 Like

So were we able to do this
Cheers @Phani_Kumar_Reddy

Are you able to do the same for other cities as well ???
If not please share the selectors you get for the other cities we will need to put wild card to get it done in that case!!!

I was unable to do this
I shared images to give insight about what exactly my question is

I’m struck
Help me in automating the data

Can you please share the selectors for two cities!!!
Or share the xaml file for reference

did these steps help us buddy
Cheers @Phani_Kumar_Reddy

1 Like

Forum.zip (9.3 KB)

Hope this helps.
I used @Palaniyappan suggestion.
Also, you should practice creating automation project your self :slight_smile:
Cheers

2 Likes

Thank you so much for the solution
when im trying to run
im getting this error

19.7.0+Branch.master.Sha.8c253d13718eed5c7db27daef6facd1fe1b0d067

Source: Open Browser

Message: Cannot communicate with the browser, please check the UiPath extension.

Exception Type: UiPath.Core.BrowserOperationException

RemoteException wrapping UiPath.Core.BrowserOperationException: Cannot communicate with the browser, please check the UiPath extension. —> RemoteException wrapping System.Runtime.InteropServices.COMException: Cannot communicate with the browser, please check the UiPath extension.
at UiPath.UiBrowserClass.Open(String bstrURL, UiBrowserFlags flag)
at UiPath.Core.Browser.Open(String url, Boolean privateSession, Boolean headlessSession, Boolean defaultSession)
— End of inner exception stack trace —
at UiPath.Core.Activities.ScopeActivity.EndExecute(NativeActivityContext context, IAsyncResult result)
at UiPath.Core.Activities.AsyncNativeActivity.BookmarkResumptionCallback(NativeActivityContext context, Bookmark bookmark, Object value)
at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context, Bookmark bookmark, Object value)
at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

1 Like

You do not have installed proper Chrome Browser extension

1 Like

Kindly try with INTERNET explorer browser as it is more compatible with UiPath
–or if we want to use only Chrome then kindly install the chrome extension and restart the studio once and try again to execute
Studio - Extension for Chrome.

Cheers @Phani_Kumar_Reddy

1 Like

Thank you so much for your quick responses

19.7.0+Branch.master.Sha.8c253d13718eed5c7db27daef6facd1fe1b0d067

Source: Write Cell

Message: Object reference not set to an instance of an object.

Exception Type: System.NullReferenceException

RemoteException wrapping System.NullReferenceException: Object reference not set to an instance of an object.
at lambda_method(Closure , ActivityContext )
at Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context) at System.Activities.CodeActivity1.InternalExecuteInResolutionContext(CodeActivityContext context)
at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity1 expressionActivity) at System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor)
at System.Activities.RuntimeArgument.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance targetActivityInstance, ActivityExecutor executor, Object argumentValueOverride, Location resultLocation, Boolean skipFastPath)
at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate) at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

this error depicts that the variable used in write cell activity has no value in it
kindly check once with a write line activity and mention that variable in it and use this write line activity before to the write cell activity

kindly share the screenshot of the output panel to validate whether the value is getting displayed or not

Cheers @Phani_Kumar_Reddy

1 Like