How to change the variable column name

Hi ,
I have a datatable and I want to change the second column name.

In every loop I am getting new datatable hence column name will not be same.SO I need to change the second column with string value “Pascal”

Please help

@Karan28

Hey
Pleas have a look.

dt.columns("PreviousColumnName"/1).columnName="Pacal"

Hey I dont have previous column name fixed because I am iteratation through for each row loop.

for each iteration I an getting different datatable with different column names.

@Karan28
You can use index

dt.columns(1).columnName=“Pacal”

It worked thankyou so much

1 Like

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