Add Data Row: Error:Input array is longer than the number of columns in this table

I am getting this type of error Add Data Row: Input array is longer than the number of columns in this table. so can anyone help with this

i think you give extract value please check the build data table or excel file or share your xml file i will give you solution

regard
Chethan P

if you are passsing a array in add add data row check the size if datatable consist 3 column then array needs to be of size 3

can you please tell me how to add size ? my data table consists of 15 columns

sorry I am a new user I cant share files

we cannot add size supposose
Datatable
Column Name : Name || Age | | Mobile Number
Its size is 3
And if you are trying to use add data row for this then
{“abc”,“19”,00000}

In your case it is 15 and you are adding more than that
if you can create a sample xaml i can rectify the error
if it works to you

but it is having more than 1000 rows in data table

Ok fine How you are adding the data
image
Datarow or Array row

how many columns does row.itemarrya has?

i am using arrayrow (row.itemArray)

15 columns and more than 1000 rows

its more than 15 thats why it is throwing may pe try to print log before add data row
row.ItemArray.Length so that you can check it is 15 or not

ya its 38

So it is throwing the error
Let me know if you need further help
otherwise mark it as a solution

but how to resolve this error

you have to pass array which has a length of 15
check each row array data print it in logs what is coming xtra after that you can remove that

no i want whole array each row and column

you cant use add data row to add the row which contain 38 column and the main datatable which has 15 row
you have take a fully new datatable

main data table also contain same column 38