Outlook Items to Excel


How can I save all the email subjects from the inbox folder into excel sheet?
While UIpath reads all the subjects of the emails and stores it as a list, how can i store the list into an excel sheet?


Build DataTable with 1 column (lets say Subject)

To get only Subjects from emails —> emailList.Select(Function(s) s.Subject).ToList()

Foreach item (string) in List

add data row —> DataTable --> dtSubject ArrayRow–> {item}

Write Range --> dtSubject