I’m currently new to Uipath program. I have a question regarding copy excel data in column from a file to another file. I need to copy data from column G1 of excel file 1 to column AF3 of excel file 2 and so on as mentioned in picture.
Excel file1
Excel file2
I’ve tried using Read Range function but It doesn’t work so far. Since the table of both excel are not in the same format so I was wondering if we can copy specific column to other column
Use “Use Excel Activity” and provide the Excel to automate.( first excel)
2)Use Read Range Activity and for selecting the range use Indicate in Excel and select the column which you want to copy.
3)Use “Use Excel Activity” and provide the Excel to insert the data.
4)Use Write DataTable to Excel activity and indicate the AF3 cell to the end to insert the data table which you got from the first excel.
The values to insert you ll get as Datatable …Use a for loop…Then insert the data to another excel using write cell activity… Inside this activity u need to change the cell number using counter
Could you provide us with the Sample Excel file 1 and Expected Output Excel file 2. It does seem that you would want to Transpose the Data, but not quite sure as we do not have a complete picture of the Excel file 2.
If you are still looking for a Solution, Do provide us with files to work on, so that we could be able to help you in a better way.
Considering some assumptions, I was able to develop the Workflow which provides the required result. However, Do test it with Different Data and Let us know if this doesn’t satisfy the result.
First, we create the Output Datatable as Required using Build Datatable Activity. Here the Output Representation is Considering All the Columns Present in the Second row of the Excel2 file.
After analysing the Expected Result, we realise that we do not need other Columns from Excel1 file, but only the first and Last Column which provides us the Values. Hence, we Filter the Columns to keep only Required Columns.
Next, we would perform the Transpose of the Filtered Datatable, which would provide us the Values to be accessed using the Column 1 Values as the Column Names.
We would also require to install a Package to use the Transpose Datatable Activity.
Package to be Installed :
Next, we use Add Data Row Activity and Populate the row value in the Output Datatable.
At the End, we could write the Output Datatable to the Excel2 using Write Range Activity starting with the Range as B3.
Also, Check for Different types of Input Excel file that you would receive, as the Output for this is assumed to be a Single row. (The Solution needs to be modified, if multiple rows found.)