Changing and merging the names of more than one attachment from the email

Hello everyone,

I have two “.xlsx” attachment from the mail. I have to rename these files and then merge them.

Alperen KEZAY


  1. Read first workbook and store its data in datatable1
  2. Read second workbook and store its data in datatable2
  3. Use a Merge Datatable activity( merge first datatable(“input”) property into second (“output”) property)
  4. Use write range activity and supply new path which will create a new workbook and supply output datatable to it.
1 Like

Thank you, the project I prepared will be used many times and maybe more than two attachments will come. Do I have a chance to get this situation into a loop?

Yes, you will get…
// Create empty datatable that store all files data each time loop executes.
Dim datatableFinal as Datatable = New Datatable()
strFileArray = Directory.GetFiles(“your_Files_Path”, “*.excel”) — please explore more on google.
for each file in strFileArray {
// Perform above steps given.
// Provide datatableFinal to output property of Merge datatable activity.

1 Like

I solved the problem with these methods, thank you @Pankaj.Patil

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.