Please help me in getting my requirement done in UiPath, my requirement is as follows,
Have to read an excel, which contains all the Filenames under one column.
Read each Filename from the excel and search for the file at one specified folder location (For Example: C:\Files) folder.
If file doesn’t exist then fetch the next Filename from the excel sheet.
If file exists at the specified location then open one application and navigate to some specific location and upload this file.
5, Repeat this process for all the Filenames in the excel sheet.
Hope you got the requirement.
Please throw your great thoughts on this. Thanks in advance.
Use Read Range Activity and create a dataTable and use it as your output.
Use for each row activity on the output dataTable, inside the do section use the Path Exists activity with the following syntax "C:\Files"+row(columnName), create a boolean and place it as the output of this activity.
use an If activity with the Boolean as the expression, in the Then section place the process to open your application and upload the file, in the else section just don’t place anything.
Hi @rajas
You may use the below example as a support, where “dt” is the output of “Read Range”, “fileName” is the output of “Get row item”, and "fileExists’ is the output of “Path exists”.
In the sequence for the column “Then” in “If” add the activity “Open application” and the activities you want to perform to attach the file. Please note that in this case the application will be opened each time for each file, and you may need to think how and when to close it. This may be solved e.g. by rewriting the flow to open the application IF ANY file exists. Please let me know if this workflow below solves your matter
hi thank you for sharing the xaml and example… is there a way to read the files one by one mentioned in column a(all are excel files) and save the desired cell value in output file,
may i know what dependencies are you using because i am getting this error…
Hi, I understand that instead of pdf files like in my example, you have excel files listed in that “main” excel file, where you would like to get the value of some specific cell for each of them. You can achieve it by many ways - e.g. by “Read cell” activity from the “Workbook” scope, where you need to specify which cell it is - e.g. A1. For that, you don’t even need to open these files Another ways are for example via “Read Cell” from the “Excel” scope or “Get Row Item” from the “DataTable” scope, but these require some extra action - in the last case you would need to first convert each excel to a data table - e.g. by an output of “Read range” activity from the “Excel” scope
Thank you very much for the support. The above works well
it would be very helpful if you could share the xaml file for reference. i am very new to the tool uipath but it so much helpful here to get learning boost.
That is the very same xaml as before - I’ve just added these two activities as shown in the picture:Read cell (settings are shown on the right) and Write line in the scope of If fileExists