E.T.S
1
Hello,
I have the following activities that add and remove data rows in specific locations in Excel:
I would like to achieve exactly the same but for a data table
I have configured the remove data row:

But I cannot add a data row in a specific location in the data table as this option does not seem to exist in this activity:

Please advise how I can achieve this
Cheers
vrdabberu
(Varunraj Dabberu)
2
Hi @E.T.S
Try this in Invoke Code:
dt.Rows.InsertAt(dt.NewRow(), Math.Min(intRowsIndex + 7, YourDataTable.Rows.Count))
If possible share the input and expected Output file
Regards
1 Like
lrtetala
(Lakshman Reddy)
3
Hi @E.T.S
If you want to add the row at particular index then try this
DT.Rows.InsertAt(DT.NewRow(), Index)
Add Data Row activity wont add the row at particular index
Input:

Output:

Regards,
Lak_Ui
(Lakshmi)
4
Create new row using
newRow (DataRow)=dataTable.NewRow()
To insert datarow at a specific index
dataTable.Rows(index)=dataTable.Rows.InsertAt(newRow, index)
E.T.S
5
This works perfectly to give me the output I need thanks!
1 Like
system
(system)
Closed
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.