How to change the datatable column sequence


I read excel by using read excel and stored data in datatable, now i want to change the datatable column sequence. Please give solution.

Insert a Column into a specific position in DataTable
How to copy the column content in one excel sheet to the other sheet in the same excel

Hi @AmolS,

I believe that in your case you could iterate between those columns and reorder their sequence by using an index array and a for each loop like the example below:


Hey @AmolS

please find this attached sample solution(For demo)customized it as per your need if required and let me know :slight_smile:

Sample (5.9 KB)


How to insert a column between two columns?
Insert column at first position

Thanks Akshay…!