Question

how to store email details to excel sheet? I want to store the 'email from' to one column, and the 'subject' to another column beside the 'email from' value

  • 31 August 2022
  • 3 replies
  • 83 views

Badge +5
how to store email details to excel sheet? I want to store the 'email from' to one column, and the 'subject' to another column beside the 'email from' value

3 replies

Hi @Eusha Khan​,

Please Use Loop Command to Iterate all email use dictionary keys:

1.emailFrom 2.emailSubject

Refer below article:

https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/cloud-using-email-properties.html

 

Store Record to Excel using Set cell.

it is not clear exactly what you need help with re: scope, source of data, etc., but I generally use the Log to file action, writing to an excel workbook saved as .csv. This allows you to do simply write simple comma separated lists of values as below:

imageimageFor a more detailed description of this process in a loop, see Liam's recent question before yours in the forum. Simply though, the first action creates the headers, and the second action will write the values any number of times, appending to the sheet.

 

Hope this helps!

Userlevel 4
Badge +7

Hi @Eusha Khan​ ,

 

If you want to write it to excel, then follow this approach:

image 

-> Excel Advanced: Create New Workbook

-> Excel Advanced: Go To Cell: A1

-> Excel Advanced: Set Cell > "Email From"

-> Excel Advanced: Go To Cell > One Cell To Right

-> Excel Advanced: Set Cell > "Subject"

-> Excel Advanced: Go To Cell > One Cell Bottom

-> Excel Advanced: Go To Cell > Beginning of Cell

#Loop For each Mail in MailBox(Assign Dictionary or output to string values(emailSubject,emailFrom))

--> Excel Advanced: Set Cell > dict{emailFrom}

--> Excel Advanced: Go To Cell > One Cell To Right

--> Excel Advanced: Set Cell > dict{emailSubject}

--> Excel Advanced: Go To Cell > One Cell Bottom

--> Excel Advanced: Go To Cell > Beginning of Cell

->Excel Advanced: Close(check save option)

 

Kind Regards

Ashwin A.K

Reply