Copy data from one excel and append the data into other excel with varied column positions

Hi Folks, could you please help me with a xaml file with solved logic for below scenario

I have two excel files Work File and Master File.

Master File.xlsx (10.4 KB)
Work File.xlsx (10.3 KB)

I have to go into the Work File, check if new data is present in the Work File (four cases present for this example question), then append work File data at the last of the Master File within the same column names.

For eg., Unique Identifier in work file should be pasted at last of Unique Identifier of the Master File, and so on.

Output should look like this:

image

@shikharno.7

Use the read range workbook activity and read both the excel files and then create a data table with required columns and the use the for each row in data table and within that use another for each row in data table and within the 2nd for each row in data table use the add data row and compare between the rows of each data table before the add dat row activity and if the 1st data table row was not matched with any row of the 2nd data table then using the add data row send the data to the table created using build data table and the at last means outside the first for each row in data table use the append range and append the data to the existing excel.

Please see the below attached flow

Hope it Helps!!

Hi Varun,

Thanks for you response.

I am not sure how this will paste the data into exact desired columns, that’s why seeking a xaml working file. Tried the same method but couldn’t make it work. :frowning:

@shikharno.7

In the build data table you need to create the columns in the same order of the headers present in the excel.

In add data row also you should send the data in the same order.

Regards

@shikharno.7

please refer the below xaml so that you may have some idea about the add data row and build data table
sample.xaml (56.5 KB)

Regards

can you please share excel file used in this xaml

@shikharno.7

Can you please tell me on what basis you want to check means what rows should be compared?

Regards

@shikharno.7

Here is the output for your query


Sequence.xaml (28.8 KB)
Master File (1).xlsx (10.1 KB)
Work File.xlsx (10.3 KB)

Regards

1 Like

@shikharno.7

If you find the solution for your query please mark as solution to close the loop.

Regards

Hi Varun,

Thank you for the solution, appreciate it :slight_smile:

@shikharno.7

Thank You

Happy Automation!!

1 Like

@shikharno.7

If you find solution for your query please mark as solution to close the loop.

Regards

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