Repeated data while outputting data table

While outputting a data table using output data table and write line, the headers and the rows are getting repeated and repeated. See the screenshot attached. Kindly advise.

Hi @mail4bobbysam ,

You can try using the Remove Duplicate Rows Activity and then assign the first Row as headers.

image

Kind Regards,
Ashwin A.K

@mail4bobbysam

I guess you are printing that DataTable after adding each row in an iteration because of that it is showing rows repeatedly.

If you don’t want then use Clear DataTable activity to clear DataTable and add new row to it and then print it.

Hi,

I suppose the following may be what you wan to achieve.

img20220328-7

{dt.AsEnumerable.Last}.CopyToDataTable()

Regards,

Thanks alot Lakshman, there you are, got it. I am new to RPA UiPath. Thanks alot for your immediate attention.

1 Like

@mail4bobbysam

Glad I could help.

If your query resolved then please close this thread by marking appropriate post as solution. So that it will help others who are facing similar issue.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.