Add all read range ouput to one DataTable

I have a datatable which is a build dt

and I have a for each which reads every excel file in a directory and has an output datatable

How do we keep or what activity to use to keep on adding the output of the read range to the build data table example above ? so that all result of the read range in a loop would be stored as one datable. Thanks.

here is an example excel data

@AhmedKutraphali - After the Read Range…

Do If File.exits(“Output.xlsx”)

Then Add Append Range–> Output.xlsx → Dt from your Read Range
Else Write Range – > Output.xlsx → Dt from your Read Range (First Time output file will not avaiable, so it will go to else condition and from 2nd time onwards it goes to append range and keep appending your ouput.xlsx")

Hope this helps…

I think we have misunderstanding Sir @prasath17 . What I want is to append the output of the read range which is DataTable to the Build Data Table I created. So every read range output will be added to a single DataTable.

I understand Sir your answer but do we need to create a seperate excel ouput?

You could try to save the output of each read range in a temporary datatable, than use the Merge Datatable activity to add the data to the datatable you built at the beginning.

@AhmedKutraphali - I guess you don’t need a build datatable activity here… Read each file and write it and append it…that’s all…

1 Like

Excellent , thanks for the idea Sir . Done. Appreaciated.

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