How to open all the files in a folder and then read the data present in each file using UiPath Community Edition?

I want to open all the existing files in the folder, read the data I want in each file, and then enter the details in a new csv file. So how should I perform this task?

1 Like

Mostly excel files are present in the folder

Hi you can first get all the paths of the files in a direct in array of strings. Then after that use for each item to iterate through those paths and you can perform the operations on each file.

1 Like

@Moola_Kommalu

Try below expression to read all excel files in a folder.

       strExcelFiles [] = Directory.GetFiles("FolderPath","xlsx")

And then use ForEach loop to iterate one by one file.~

2 Likes

If you want to perform task on excel file only then
Using For Each item of directory.GetFiles(“d\abc”)
Use If ----- Item.contains(“.xlsx”) or Item.contains(“.xls”)
then
Excel Application Scope
Read Range

Else -----Blank

1 Like

thanks for your help.

1 Like

thanks you very much. I understood what i have to do.

Welcome:blush:
Happy Automation!

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