How to copy data from excel file

Can anyone help me out on this ,I want to copy alternate rows from one excel file and write it to another excel file in the same way like writing it to alternate rows.

Advance thanks!!!

@NikhilRPA

Welcome to the uipath community.

  1. First use Excel Application Scope Activity and then use Read Range Activity to read the data from excel file and will give you output as DataTable and say ‘inputDT’.

  2. And then use ForEach Row Activity to iterate that DataTable.

            ForEach row in inputDT
             int index = inputDT.Rows.IndexOf(row)+2
              If index % 2 = 0
              Then use Insert/Delete Rows Activity
               Else Nothing
    

Note: In this activity, set below values to each field.

NoOfRows - 1
Postion - index
ChangeMode - Remove
Sheet Name - excel sheet name

2 Likes

Thanks this works for me I guess.

1 Like

@NikhilRPA

Try once and let me know if you face any issues.

Sure

1 Like

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