Open Excel files from the Queue and add in one consolidated excel

@NIVED_NAMBIAR

Steps for the RE framework bot:

  1. Collect all the files from a folder and add them to the queue.- Successfully done using For each.
  2. Open each file from the queue.
  3. Copy its data into one consolidated file, save and close.- Successfully done
    Question in step 2- how to pull the file path from the queue/transaction item? How would the bot know which file needs to be opened now? Could you please guide on the steps for this?
    Thanks in advance!
    Abansal

Hi @abansal
welcome to forum

There would be two ways :

One, you can store the filepath in queue item with field name as file

then while retriving the data from queue, use in_TransactionItem.SpecificContent(“file”).ToString, to get the filepath, by which u can open the file.

second way is, if the data is text file, u can store the filename and content in file in queue item and the access it

Hope the information helps you

Regards,
Nived N
Happy Automation

Thanks @NIVED_NAMBIAR

Could you please guide me on how to achieve this - “you can store the filepath in queue item with field name as file

Hi @abansal
see this workflow

Now the assign activity will read all filepath in a particular folder and store in file_list variable

file_list = Directory.GetFiles(folderpath)

Now next it will loop through each filepath in file_list variable

[ForEach item in file_list]

Now in Add Queue Item, in collection part , it will add this data

which is the file path ,

In this way you can store the filepath information in queue

Main.xaml (9.7 KB)

Hope it helps you

Regards,
Nived N
Happy Automation

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