@samyak 1. Use the “Excel Application Scope” activity to open the Excel file.
2. Use the “Read Range” activity to read the data into a DataTable variable, let’s call it “inputDT”.
3. Add a “For Each Row” activity and set the DataTable property to “inputDT”.
4. Inside the loop, add the following activities:
Use the “Insert/Delete Rows” activity and set the properties as mentioned earlier.
Use the “Assign” activity to shift the columns. For example:
To shift the 3rd column (index 2) to the 2nd column (index 1):
Assign: row(index + 2).ToString
To: nextRow(index + 1)
Save the modified DataTable to a new Excel file using the “Write Range” activity.
Read the data into datatable dt using read range activity
Use assign activity and give as like this for a new datatable dt1 = dt.Clone
Use for each row in datatable on dt
Use add datatow inside it with dt1 as datatable and array row as {currentrow(0).ToString,currentrow(1).ToString,"","","","","",""}
Use another add datatow again with dt1 and array row as {"",currentrow(2).ToString, currentrow(3).ToString, currentrow(4).ToString, currentrow(5).ToString,"", currentrow(6).ToString, currentrow(7).ToString}
One more add datarow again on dt1 and array row as {}