Support > Forums > OpenBots Studio > Lookup Data Table

Lookup Data Table

Harshita Aralikatte Ramesh

  • Reporter
  • Calender Icon January 18,2023 at 4:06 PM

Lookup 2 excel columns. 1.Excel it contains Ordered By name. 2.Excel it contains corresponding Ordered By name With Mail id's. We Lookup Ordered By name and after that send email to Outlook. How to process this?

This forum has 314 topics, 681 replies, and was last updated 22 days ago by Support Agent

Rushabh Arbat

  • Participant
  • Calender Icon January 23,2023 at 5:10 PM

Hi Harshita Aralikatte Ramesh,

The error occurred due to providing wrong column name, make sure to provide correct column name which contain mail ID's.

(For Ex- in my case, I provided column name (Gmail) -> ​vCurrentRow["Gmail"].ToString()

Please let us know if it works.

Thanks

Harshita Aralik...

  • Participant
  • Calender Icon January 20,2023 at 12:05 PM

Thanks for your Reply, I tried this step. In Send Outlook Email Getting an Error.(Type: Arguement Exception, Message: The column 'Email' doesn't belongs to table)

Rushabh Arbat

  • Participant
  • Calender Icon January 20,2023 at 5:26 AM

Hi Harshita Aralikatte Ramesh,

​ You can follow following steps, depending on the use case and specifications.

Firstly, open the existing excel file by using the Create Excel Application command. Then, use the Excel Get range command to get the range from the targeted workbook and store in a datatable variable.

Once the datatable is generated, you can use the datatable commands to interact with the values you need. For example, using the for each loop command, you can iterate a data table by rows. Use the Set Variable command to store the current row value for a particular (Mail) column Name. Inside the loop you can perform other actions, like send Outlook Email to the extracted Mail cell value

By following above steps, you can send outlook mail to everyone in excel sheet.

Now, if your use case requires to look for the specific value based on input data, you can use the Lookup DataTable command to search for a value inside the datatable and return the datarow containing the cell. If the target column is set, it also returns the value of the cell from the specified DataRow.

Thanks

You are not authorized to reply, please click here to login and add your reply to this topic.