I’m running a process with require taking information from excel file. And i have that in Assign activity where i mention in the value the path of the file. After that i’m doing this Excel assign activity output as DataTable and using it in for each a lot of times.
So basically i want to make it after process end. Start again and automatically change the value with another excel file.
I have read that this is possible with config file with can contain all values for the excel files(paths) , but i’m not sure how.
Since i wanna fully automate it to don’t require person to manually change value of assign activity with another path after each time it ends. This way i can run it in Orchestrator which is the main goal. I guess i will need to LOOP the whole process and change the excel file to another.
I want to do the process for one file(excel) than the same process from start for another file. But this file(excel) is used as DataTable. So you mean in the assign activity to mention Directory.GetFiles and put all excel files in one folder and the uipath will take first excel will make it datatable after it finish everything will take the next one ?
Hope these steps would help you resolve this issue
—use a assign activity like this
arr_filepath = Directory.GetFiles(“yourfolderpath”,”*.xlsx”)
Where arr_filepath is a variable of type array of string
—then use a FOR EACH activity and pass the above variable as input and change the type argument as string in the property panel
—inside the loop use READ RANGE and pass the input filepath as item which will be holding the filepath of the first file
Then after processing the data inside the same FOR EACH activity, atlast before getting out of loop use MOVE FILE activity and mention the folder path of the files where it is stored, in source property
And in destination property mention a new folder path where this first file will be moved
—next to this move file activity use a BREAK activity so that the loop will stop after processing first file
From next when it runs it starts with next file and stops after processing that as we are storing the loop with break after one iteration itself
Down below through the process i’m using read cell values is this going to be a problem i can this solution tomorrow and will report. Otherwise if i can make this read cell not hard coded , but mention maybe the name of the column
Since data is like this
Example
A1 - column name / A2 - value data
I did it with read cell since i dont know how to make it to get data like that
Hello I have manage to do it to read each file go through the process and after that start with the other file. I’m not using break activity since the robot stop with break activity i want to go through all files. The idea for move every file when it end with it it’s really good this way will know which file is done , but i didn’t manage to do it since when i enter From (filepath) where are all files To(filepath of new folder) i got error message. That it cannot find the file or anything like that.