Input array is longer than the number of columns in the data table

I am using the “ADD DATA ROW” activity to add rows to the data table but I’m getting an exception
“Input array is longer than number of columns in the data table”
I have tried the following solutions but they are not working

(1) Used assign activity to give the value of the System. Data.DataTable to the data table.
(2) I have also used build data table activity to generate columns

But nothing seems to work

Hey @Sami_Rajput

You are passing an array with size greater than the number of columns available in the data table.

Kindly check that please…


Array size depends upon the Columns I’m iterating through to get the rows

Yes, It depends upon the number of the data table columns.

Hello @Sami_Rajput

Have you created the datatable using Build Datatable activity?

Check whether the Number of items that you are passing in the Add Data Row activity is having the same number of columns as in the datatable that you created.


I didn’t get it but somehow the exception is no longer here!
I’m debugging it to find the reason

if still error, you can share a screenshot of the Workflow and the data that you are adding to the datatable.


It’s solved