Append data in excel

How to append data like this:-
Input.xlsx (8.8 KB)

and the output should be:-
ExpectedOutput.xlsx (8.3 KB)

How should i do.

@Rup_1 After reading excel Based on row index or marks column value u insert the values in other column of datatable and after process completion u can write that datatable again to excel

Hi Manjuts90,
Could you please provide xmal file for above

@Rup_1 on what basis ur doing that operation can u tell?

i think we can do by taking reference of Email.first robo will see whether the email ends with,if yes then it will append marks like this.
but i didn’t get how to do that

@Rup_1 y u deleting values from name, surname,email columns from the row which is having 80 as value in marks and inserting those values in row which is having marks value is 78

Follow the steps below to achieve the expected output:

  1. Use ReadRange Activity to read the Input.xlsx and output is stored into DataTable
  2. Take the count of rows from a datatable (excluding header) = iRowCount
  3. Take the count of Names which are not empty from a datatable (excluding header) = NameRows
  4. use WriteCell Activity to write headers into a new file lets called Output.xlsx file
  5. iDiff= iRowCount/NameRows
  6. Use for loop to writecell into Output.xlsx with below logic

Consider sheet2 is the Output.xlsx
iDataStartRow = 2

For iIndex = 2 To iRowCount
       Write Cell Activity -> Sheet2.Range("A" & iDataStartRow).Value = Sheet1.Range("A" & iIndex).Value
       Write Cell Activity -> Sheet2.Range("B" & iDataStartRow).Value = Sheet1.Range("B" & iIndex).Value
       Write Cell Activity ->  Sheet2.Range("C" & iDataStartRow).Value = Sheet1.Range("C" & iIndex).Value
        iDataStartRow = iDataStartRow + iDiff
        If (iDataStartRow > iRowCount) Then
            Exit For
        End If
  1. Copy marks column into D column in the Output.xlsx

Karthik Byggari