How to get filepath based on specific keyword

Hi Team,

I have one excel, this is excel have more sheet for ex 4 sheet

In folder filepath having with sheetname , i want to pass sheetname once sheetname contain filepath, i need to pick that path.

Please help me anyone for this.

Input:

expected output:

Path :
“C:\Users\Raja\Documents\New folder (2)\Book-vvv.xlsx”
“C:\Users\Raja\Documents\New folder (2)\Book-xyz.xlsx”

Hi @Raja.G ,

Can you please elaborate what exactly is your question.
Are you trying to read the sheet from the first input file based on the file present in New Folder (2)?

image

image

image

Hey @Raja.G your question is quite confusing. as per my understanding . if you have multiple Excel Sheets and you want Specific Sheet from the Sheets. you can check with these 3 activity

Cheers Happy Automation.

Hi @Raja.G ,

You may try the following solution:
Step1: use “Excel application scope” activity to read the excel file and drag “Get workbook Sheets”. it will store all the sheets in a list of strings.

Step2: For each loop, Directory.GetFiles(“FolderPath”)
Step3: in the same container, use an if activity with the condition:
mySheets.Any(function(f) file.Contains(f))

FilePathFinder.xaml (11.7 KB)

Please refer to the attached solution and let me know if it works.

Thank you,
Anjani

1 Like

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