Add Data Row: Index was outside the bounds of the array

Hi All, am getting the error for Add Data row, while am converting from PDF to EXCEL. The following is the xaml file below attached,

8130-3_sample_for_demo.pdf (32.5 KB)
opp.xlsx (11.0 KB)

test.xaml (24.0 KB)

Can anyone please help me to solve that issue!

Thanks.

1 Like

In your Add Data Row activity you’re expecting arr1 to have 24 elements. numbered 0 - 23. But right before that you’re assigning arr1 equal to “value2.Trim.Split({” “},StringSplitOptions.RemoveEmptyEntries)” which means that the number of elements is going to change.

I ran your sample, and in that specific case arr1 only had 4 items (0-3) at the time you were using the Add Data Row activity. You’re getting the “Index was outside the bounds of the array” error because arr1(4), arr1(5),etc… are outside the bounds of the array.

1 Like

Yeah, thanks for letting know my mistake!

2 Likes

@sushmithaelluru Could you share how you solve the problem?

1 Like