Hi I have one folder which have files like pdf , message , text , excel
Now I want to work on excel butexcel extension is not its changing in every run
How can bot identify excel
Please help
We have .xlsm So it will work or not?
Hi @Kuldeep_Pandey
Give the expression as below. It will consider only .xlsx files in that particular folder.
Directory.GetFiles(your input, "*.xlsx")
Hope it helps!!
It’s work
Take the folder path by assigning variable = Directory.GetFiles(Your Folder path)
Use for each file in folder and pass the variable.
In that use the filter and pass “*.xlsx”
Now you can do your actions within that for each file in folder activity.
Hope it works!!
I have many excel extension like .xlsx and xlsm and many more
So it will work for all?
Use the For each file in folder activity to iterate the files in the folder.
In the option of the activity You can give the filter to get the xlsx files means excel files.
Give the below one for three extensions
"*.xlsx,*.xlsm,*xls"
Please check the below image for your reference
Hope it helps!!
That the thing I am telling you extension is not same in every run it will change
So i need solution for this
@Kuldeep_Pandey
Try with using Wild card entries.So, it will run through each file of excel “.xls * " or ".xls?”
Hope it helps!!
xls
Is it will work for all?
Change the filter condition to "*.xl*"
because you have .xltx extension also please change as per this.
Regards
If you find the solution for your query please do mark as solution to close the loop
Happy Automation!!