How to rename a column of a datatable from excel?

how to rename a column of a datatable from excel

Hi @suruchi120294,

Did you try this

dataTable.Columns["OldColumnName"].ColumnName = "NewColumnName"; 

Thanks,
Prankur

9 Likes

got it . thanks alot :grinning::grinning: @PrankurJoshi

Hey @suruchi120294

This is most common query so will you please do a favor next time search forum first for this :slight_smile: instead of a new thread :slight_smile:

Thanks in Advanceā€¦!!

Regardsā€¦!!
Aksh

1 Like

@aksh1yadav yes sure :v::v::v: