How to read our required excel in a folder

I have 5 excels in a folder ( Team Manager Ram.xlsx)
I have 5 names in a queue(ram, some other data…)
if queue conatain ram then bot have to read Team Manager Ram excel, if queue contain som then bot have to read Team Manager som.xlsx file
the 5 excels are consistent here
how can we achieve please anyone here suggest me,
Thank you

take switch activity and
write conditions for each queue item

1 Like

Hi @panguluri_saritha

=> Take an If condition to check the name in the queue

- Condition -> TransactionItem.Specificcontent("Name").toString.Contains("Ram")

=> In then block give the read range workbook activity to read the ram excel file.
=> In else block give the read range workbook activity to read the another excel file.

Hope it helps!!

1 Like


Hope the below steps would help you resolve this

  1. Use a assign activity like this

arr_filepaths = Directory.GetFiles(“your folderpath”)

Where arr_filepaths is a variable of type array of string

  1. Now use a assign activity to get the filepath

str_filepath = arr_filepath.Where(Function(s) s.Contains(“ram”)).ToArray().ElementAt(0).ToString

This will give un the filepath you want

Cheers @panguluri_saritha

Hi thank you,I applied this logic,but below error is coming any suggestion here please

Actually here input sheet name to the read range is coming from queue…


solution for read range, thank you

thank you @Palaniyappan

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