Mapping of column for 2 different excel

Hi,

I am having two different excel which consist of same row name(“Name, Marks”). I just want to copy Name and Marks data from one excel to another against the same column name in excel two(“Name and Marks”).
Here one condition is like the column position will not fix.

I am not sure I understood you correctly but,

You can read file2, and use append range activity to add the data from file2 in file1, you can if needed also use the filter datatable activity to only keep Name and Marks columns:

image

@sshitol

it would be good if you can show some input and output example

cheers

@sshitol , I hope this will help

you need to do the below activities, if the column location was not fixed
1 - Read all the file
2 - then find the specific keyword in Excel cell position
3 - Then you need to record the cell position
4 - Then you need to get the position of location by index value
5 - Read the value

The second option is that you need to write the micro which find the specific column value and its return the location and based on that you can re-read the data.

Note: if both the file column location is not fixed then you need to use same logic both the file

@sshitol if you can share the both input 2 sample file, we will help you on the same

image

Excel1.xlsx (8.9 KB)
Excel2.xlsx (8.7 KB)
From excel2 to excel1, I want to copy paste only Name and marks but the position of name and marks in column 2 will not be same

Hey @sshitol

Just use below mentioned LinQ in assign activity:

dt_Excel2.AsDataView.ToTable(False,{"Name","Marks"})

Note: You can add column names in above query if you need more columns as output.

Screenshot for your reference:

Attaching .xaml for your reference:
MappingColumn2Sheets_Sequence.xaml (7.6 KB)

Input & Output:
Excel1 (1).xlsx (9.2 KB)
Excel2.xlsx (8.7 KB)

Regards,
Ajay Mishra

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.