Build data table data to excel

hi,I am using build data table to pass data to excel.but I am getting only one value instead of all data.My requirement is need header in excel with data!!!

Kindly provide the solution How I can achieve this

First thing is please raise any dev related issues under dev tagline.

To answer your question: using build datatable you can create a new datatable and then from there on you can add values to it using for each row activity(the add data row activity also works) and then use a write range activity to write to excel and make sure you tick the add headers property in write range activity inside excel application scope.

Let us know if this helps,
Pavan H

@pavanh003 thanks for your reply I am using same you mention but I am getting header and only one value not all data in excel

It appears that you have added two columns after the Build Data Table activity. I would suggest adding those in when you build it.

The highlighted Add Data Row is trying to append a DataRow with an array with only one index, which is what I believe is causing the issue. It appears that you may have two or more columns. I am unsure whether you need to specify Nothing for the columns that you would like to not add data to.

Make sure the aray you are passing is correct.
the error is with the array of values you are passing to data table.
Make sure you pass the same number of rows to the table.

Let us know if this helps,
Pavan H

1 Like