How to execute a url in Excel depending upon cell value

datatable
excel

#1

Hi,

My first question, after a lot of searching.

I have an excel sheet with two columns of data. Column A includes a CustomerID and column B a URL adress.
I have the customer ID I need to find in a string and need to open the relevant URL in Excel. What is the easiest way for me to find the CustomerID in excel and execute the URL?

Appreciate it if you can point me in the right direction or to a topic that’s already dealt with this.

// Phil


#2

Hi Phil

We have Customer id already…

Read the excel as datatable
iterate the datatable using for each
if condion ------ row(0)= customer id
then
open browser with value of Row(1).tostring


#3

@pmay use read range activity and copy data into datatable

then use below condition

string url=dataTablename.select("[first column name i,e customerID]=’"+inputIDOfCustomer+"’").(0)(1).ToString

It gives corresponding url for your input