RemoteException wrapping System.IndexOutOfRangeException: There is no row at position 389

I am trying add data to my existing datatable using below invoke code.

Input_DT.Rows(RowIndex)(“Invoice no”)=Invoiceno

I am getting below error

RemoteException wrapping System.IndexOutOfRangeException: There is no row at position 389.

note:389 th row i want to add the data.

Please help me to solve this.

row index will be position -1.so in your case rowindex should be 388

Hello @BNK , The error means there is no data range on 389.
and if you saw data in excel on row 389, then give -1 from row in excel. Index always begins with “0”. so 0=1, 1=2,2=3… 388=389. So try

Input_DT.Rows(RowIndex-1)(“Invoice no”)=Invoiceno

Regards,
Gokul Jai

Hi @Lak_Ui and @Gokul_Jayakumar
I Tried this one but again i am getting same error. RemoteException wrapping System.IndexOutOfRangeException: There is no row at position.

I am not able add new row item in existing datatable.

if you want to add new datarow to the existing datatable use Add data row activity

can you share the wf file and excel if possible

Hello @BNK

Above query is used only when there is a data , you have to change it.
For Example there is 500 rows in DataTable, You need to change the 389th row of Invoice Column, You canb use this query.

If you need to Add fresh data, you have to use ADD Data Row in data table activities.

Regrads,
Gokul Jai