Row problem

Uploading: IMG_20220605_232418.jpg…


@Sabbir_Anwar

As refer to the image , There is no row Present in your datatable at -1 index.
Can you use Row(0) In place of Row(-1).

Thanks. But here row 1 exists

Hello @Sabbir_Anwar ,

Can you please provide the assign statement Screenshot.
As per the error message you are assigning a value with wrong index. (If Index not sound it returns -1)

Regards,
Rohith

Thank you for your reply sir, here is assign activity



Hello @Sabbir_Anwar ,

Print the intRowIndex.ToString and check if you are getting the required index value.

Regards,
Rohith

Dear sir, I did not understand

@Sabbir_Anwar

check the value of index which you passed in assign Activity.

@Sabbir_Anwar ,

In Message Box put intRowIndex.ToString

Check if you are getting value. If its is throwing error debug the issue as intRowIndex is not getting the required value from your previous expressions (where you are assigning it).

I checked, I didn’t get value. Could you please help me to design what will be the new assign value.

It would be helpful if you can explain us what are you trying to achieve here and which part you are getting error, with clear screenshot and steps that were performed by you.
This will help anyone to guide you in right path!

Regards,
Rohith


Dear @rohith.prabhu sir,

I want to vlookup Between these two workbook.

Hello @Sabbir_Anwar ,

You wanted to update the express card number for particular Employee ID from Sheet to to sheet 1 based on match right?

Hello @Sabbir_Anwar ,

  1. Perform Read Range and Store the Data in DT1 & DT2 variable

  2. Assign OutDt = DT1.Clone()

  3. Put Assign
    outDT = (From R1 In TestDt1.AsEnumerable
    From R2 In TestDt2.AsEnumerable
    Where (R1.Item(“employee_TID”).ToString.Trim.Equals(R2.Item(“employee_TID”).ToString.Trim))
    Select R = outDT.Rows.Add((R1.ItemArray.Append(R2.Item(“express_card_number”).ToString).ToArray))).CopyToDataTable()

  4. Write Range to new excel

Execute the code and check if this helps.

Thank you sir for your sincere support. But The problem has been solved by using same worksheet.