Hello everyone!
I need to read all Excel files from a folder. How to filter them by extention or another way?
Hello everyone!
I need to read all Excel files from a folder. How to filter them by extention or another way?
Hey @chrestick
You can use Path.GetExtention(item) =“.xlsx” or Path.GetExtention(item) =“.xls”
For more assistance check this out :
Regards…!!
Aksh
when i am using this condition , its giving compiled error that “GetExtention is not member of system.IO.Path”.
Could you please suggest.
Path.GetExtension
Hey @Suchi3190
You have to import System.IO if Path is not reflecting in UiPath Studio Intellisense.
or
you can directly use System.IO.Path.GetExtension Directly as well but better to import namespace.
Regards…!!
Aksh
GetExtension
Forgot to mention…
More better way to do this is you can use
Directory.GetFiles(folder_path,".xlsx",SearchOption.AllDirectories)
Regards…!!
Aksh
thanks @aksh1yadav , yes it works better