After opening a path from excel, read the excel file, get a cell value past it into an output file then after copy the file and create a folder, give folder name as file name, then past, then continue with the next path.
- Step1: Read Excel file using Excel Read Range activity
- Step2: Get Path from the datatable generated from Step1 by looping the datatable using For each Row Activity - Convert.ToString(row(“PathName”))
- Step3: Use Read Cell Value to get the cell value using the excel file path extracted from Step2.
- Step4: Create Directory activity to Create folder, (Pass the path you want the folder be to )
- Step5: Copy the excel file to the desired directory
- Step6: Move to next row in the datatable, it will be done since we are using for each row.
Please try from your end and let us know if any issues or difficulties if you are passing, instead sharing the full requirement.
For this use EXCEL APPLICATION SCOPE and mention the file path
Use READ RANGE activity inside the above excel application scope and get the output with a variable of type datatable named dt
And use For each row loop and pass the above variable dt as input
Inside the loop use Assign activity like this
str_output = row(“yourcolumnname”).ToString
Keep all this inside the for each row loop so that it will continue for the next row
Cheers @rahul_gola
We can use Excel application scope with file path of second excel file and use write cell activity with cell position mentioned and the input as str_output
Use Create Directory activity And mention the folder name we want to create
And then use MOVE FILE activity where in the path property mention the source file path and in the destination mention the new file path we want with the file name
Hi thank you so much for the support,
but i am stuck at copy file activity. i am mentioning the locationpath if the file found but it is not moving the file to the specified directory.
Thank you so much for the support sarathi
but i am stuck at copy excel file. i am attaching the workflow for your reference.Main2.xaml (25.8 KB)
In the Copy File Change the To Property as the below
"C:\Users\301478\Desktop\Directory\" + Path.GetFileNameWithoutExtension(locationPath)+".xls"
In copy file activity along the destination we need to mention the file path, file name and file type as well
Like this
“Yourfolderpath\Yourfilename.xlsx”
Cheers @rahul_gola
Thank you very much for the support,
its working now. @sarathi125 @Palaniyappan
Cheers @rahul_gola
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.