Hi All,
I am new to UI Path.
Is there a way to open the first excel file within a folder dynamically (e.g. *.xslm) without looping.
Hi All,
I am new to UI Path.
Is there a way to open the first excel file within a folder dynamically (e.g. *.xslm) without looping.
You mean opening all files which are present in folder OR one file at a time, but the file name is dynamic. Incase of later one you can use a string variable to store the name of file and specify the string variable in place of file name in app scope.
One file at a time but the file name is dynamic.
e.g. the files will be added in daily but there is no structure to the filenames.
if you know exactly the folder name
Directory.GetFiles(“Path”)
you can get all file names in array and loop through it with if condition file.extention=(“.xlsx”)
once it is matched you can break the loop
@chend
What @Divyashreem said will work. But that contains looking through the files in the folder.
Please follow below steps if you know the file you need to open will be in first position always-
After excel application scope have one break activity