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.
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
did you try with read cell and write cell activities?
Hello @Worames_Tansuwannarat_Pai ,
Please try the below steps:
- 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.
Apart from this if you have similar columns in both the Excels you can use the Vlookup also.
it that helps you please remember to close the topic.
Thank you for suggestion ! I tried your method by copying data as below;
I would like to know If we can copy Data and paste it in horizontal or have a skipping space just like this ?
If you need to add a skipping space in between then you have to use write cell and cell number increment using a counter.
Increase counter as Counter+2
So It seems I have to assign each variables to each cell, then assign the variable to the cell.
Thank you for your idea !
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
Hi @Worames_Tansuwannarat_Pai ,
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.
Thank you for your suggestion.
Here is the Sample Excel file 1 and Excel file 2
Excel2.xlsx (10.2 KB)
Excel1.xlsx (12.6 KB)
Will the Column Names of the Excel File 2 already be Populated or Is it the Same Always ?
The Column name of Excel File 2 is the same always
Hi @Worames_Tansuwannarat_Pai ,
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
Check the Workflow below and Let us know if you found any issues :
Transpose_ColumnsToRows.zip (22.3 KB)
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.)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.