How to change the datatable column sequence


#1

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
#2

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:


#3

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 Solution.zip (5.9 KB)

Regards…!!
Aksh


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

Thanks Akshay…!