Populate data in dt on even rows based on data in previous odd row

I have a dt and want to populate data on the even rows based on data present or not in the previous(odd) row only for the columns SAP Mapping 1,SAP Mapping 2, SAP Mapping 3 ,SAP Mapping 4 & SAP Mapping 5

i/p:

o/p:

Also attaching the test file for your reference:
Sheet1 is the input & Sheet2 should be the expected output.
Test.xlsx (10.7 KB)

@SunnyJha

  1. use excel file
  2. Read range and read the sheet into datatble
  3. For each row in Excel and in properties create a variable for index
  4. If condition with not (index mod 2).Equals(0)
  5. on then side you have all the even rows(as index starts from0) so on then side use assign with currentrow("SAP Mappping 1") = dt.Rows(index-1)("SAP Mappiing1").ToString

Hope this helps

cheers

1 Like

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