Particular file select

I have multiple file in a folder forrma is excel only but I extension is diff. But I want to read single file from there.
I used the method to store all in an Array then use if conditon give the name of the file which I want to read but doesn’t worked.
image
Yellow Highlighted colour file I want to read.

@Palaniyappan @HareeshMR

1 Like

You can directly give the file path in Excel Application Scope.

1 Like

@balkishan try with directory you will get output as array of string
-for each and give the input and inside it use if condition as path.GetFileName(item).Contains(“va05”) give like this

1 Like

But this last value will be changing like va05, va06, va99, va59…so on

In this case, you can use Directory.GetFiles with filter.

Directory.GetFiles(foldername,"va??.*")

2 Likes

Fine
Use a assign activity like this
OutFilepath = Directory.GetFiles(“yourfolderpath”,”*.xlsx”)
—now use for each loop and pass the above variable as input and inside the loop use if condition and mention like
Item.Contains(“var”)
—in THEN part mention this file path to open (item)

Cheers @balkishan

1 Like

Try it (just change local path according your need)

excelReadByFolderFileName.xaml (7.3 KB)