Add Data Column: Column name "status" already exists in this datatable

When i first i execute i didnt get this error when execute second time i am getting this error “Add Data Column: Column name “status” already exists in this datatable” how to sort this out please?

1 Like

Does the table already have the column with name “status” in it?
Just try to print or write the table to an excel file and see what are the columns in it.

@Sathish_Ashokan

If Not yourDataTable.Columns.Contains(“status”) Then

Add datacolumn activity

End If

Hi @Sathish_Ashokan

You can try the below way:

If Not dt.Columns.Contains("status") Then
   \\Use Add data Column activity to add the column
End If

Regards

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