Read Excel Sheet column that contains email id and save attachments from only email id's that are present in excel sheet

I am saving attachments from outlook but there is an excel file which contains 2 email id’s, we need to read Excel Sheet column(Email)that contains email id and save attachments from only email id’s that are present in excel sheet…

Hi @Sudheer_Kumar_S ,

You could Collect and Store the Email ID’s in an Array of String/List of String, then use it to compare while saving Attachments from Mail.

Assuiming that the Excel is already Read as a Datatable, we can use the below Expression to get the Email ID’s from the column as an Array of String :

emailList = DT.AsEnumerable.Select(Function(x)x("EmailColumnName").ToString).ToArray

where DT is the datatable variable, emailList is a variable of Type Array of String.

You can then use the emailList to Check if the email from the Mail is present in the list.

emailList.Contains(yourMailAddressVar)