Add column and data to datatable

Hi,

I would like to ask how to add column and data to my data table for each email that I received. can anyone let me know the steps?

currently after for each mail activity, I managed to get the email subject to string. now I need to add the strings to datatable under their respective row

@Popo

First use Build Datatable activity to build new Datatable with all required columns and merge original input file with this output of Build Datatable activity. And then read one by one row and process it and write into those two added columns.

@lakshman - Can you please explain how to merge input file with output of build table base activity

Hi @Popo
You could use Build DataTable activity and have two columns inside it. Define this activity before you start reading emails. While reading emails in for each, use Add Data Row activity to add data in the data table.
Once done, you can use Write range to add the data into excel.

BR
Devbrath Rajkhua

Hi @Devbrath_Rajkhua, @Palaniyappan

If i am reading excel files in a folder and getting the name of the files to build a datatable, and then write it into my masterlist excel spreadsheet. Can i confirm the steps below are correct?

  1. Build datatable (i.e. DT1), with string1 & string2 column before for each activity
  2. Use For each activity to loop through the files in the folder
  3. Inside for each activity, get file names using assign names (i.e. String1 & String2)
  4. Inside for each activity, use read range activity to read excel files info, output datatable (i.e. DT2)
  5. Inside for each activity, use add data row with array {string1,string2} with datatable DT1
  6. Outside for each activity, use merge datatable activity to merge DT2 and create DT3
  7. Outside for each activity, use another merge datatable to merge DT1 and DT3?

Can i confirm the steps i have taken is correct?