How to copy values from one excel to another excel

Hi Everyone ,

I have a query where I have to input values from one excel file to another excel file .

File 1 : PP-test_1.xlsx (1.2 MB)

File 2 : This is the file where I have to input the values to pp_Final.xlsx (8.2 KB)

The expected output is pp_Final Resullt.xlsx (45.7 KB)

Here I’m copying each column from file 1 to File 2 by using column names as reference .

can anyone please help me with a xaml file

@priya_joshi_thaneti Please find the attached workflow, Let me know if any issue is there.

ExcelCopy–.xaml (13.0 KB)

Hi @Manjuts90
Thank you very much . I will work on this and update you :slight_smile:

1 Like

Hi @Manjuts90,

Can you please let me know how to input values row by row in each cell ? using name as reference column ?

Like for each name I should be able to input data .

1 Like

@priya_joshi_thaneti Just think final excel has 2 columns(Name and age) and input excel has columns( Name, Place, Age).

  1. read both final and input excel sheets and output will be dt and dt1 datatable variables respectively.

  2. Use for each datarow with input datatable variable which is output of final excel(ie, dt)
    3) inside for each datarow loop use assign activity
    row(1) = dt1.Select("[Name]=’"+row(0).ToString+"’").(0)(2).ToString

    In this statement (0)(2) means zeroth row and 2nd column and Name is the column 
    name and row(0) represents first column, each time loop runs row(0) gets new value 
    from next row.
    
  3. Finally write the dt datatable to final excel again.

change the things according to your requirement, if you any doubt let me know.

2 Likes

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