The email ids i get each day is dynamic and i have to segregate rows based on email id and copy to separate workbooks.
please help
The email ids i get each day is dynamic and i have to segregate rows based on email id and copy to separate workbooks.
please help
Hi
Yah that’s possible
We can filter while getting the mail from get outlook mail activity itself with Either using
“[From]=‘Username’ “
Or
“[SenderEmailAddress] =‘xxxx@gmail.com’ “
In the filter property of get outlook mail activity property panel
Or
Once after getting the rows in a datatable
We can filter it with
Either with FILTER DATATABLE ACTIVITY or SELECT METHOD
In filter datatable activity pass the input datatable and get the output with a datatable variable
—inside pass the columnname with double quotes in column field and mention the condition and pass the value with email id between double quotes
For more details on that
https://docs.uipath.com/activities/docs/filter-data-table
Or with select method
Yourdatatable = Yourdatatable.Select(“[yourcolumnname] = ‘youremailid’ “).CopyToDatatable()
Or if with variable then
Yourdatatable = Yourdatatable.Select(“[yourcolumnname] = ‘ “ + yourvariableName.ToString + “ ’ “).CopyToDatatable()
Simple isn’t it @Tiji_Johny
Kindly try this and let know for any queries or clarification
Cheers @Tiji_Johny
Yes its possible.
Use Read Range activity to read excel data and store output in dataTable say ‘DT’.
Then try below select query to filter data.
newDT = DT.Select("[ColumnName] = '"+emailVariable.ToString+"'").CopyToDataTable
And then use Write Range activity to write resultant data into excel file and pass “newDT”.
Hi @lakshman
Thanks for the reply.
The email ids i receive each day is different , i need to copy
If you want to find the distinct email ID rows then try below expression.
distinctRowsDT = DT.Default view.ToTable(True,"EmailColumn").CopyToDataTable
sample.xlsx (11.4 KB)
Hi @lakshman
Can you please check the sample sheet attached.
As out put i need 3 separate workbook
would it be better to filter by name than email id