Suppose I am reading multiple excel files in for each loop ..there is seperate block to add data to queue then how I can fetch excel data from for each loop

Suppose I am reading multiple excel files in for each loop …there is seperate block to add data to queue of this excel then how I can fetch excel data from for each loop

It’s needs to add data to queue in another block

@Priyanka_Jadhav2,

  1. Declare a variable of type Datatable outside of For Each activity for example dtFinal
  2. Use For Each activity to loop through all the excel files
  3. Inside it use Read Range Workbook activity which will return Datatable as output for example dtTemp
  4. Use If activity to check if dtFinal=Nothing
    If true - Use assign activity to initiate it like this dtFinal=dtTemp.Clone
  5. Outside of If activity use Merge Data Table activity. From would be dtTemp and To would be dtFinal
  6. This will gather all the data from all the files. Just remember the columns should be the same in all files.
  7. After For Each activity use Bulk Add Queue Items activity to insert all rows from dtFinal

Thank you for solution I will try it now

By using above solution I am able to do

1 Like

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