Add Column name1

I have added one column through add column row but its coming in last position i want to add index of 1 in excel how to do this?

Hi @Kuldeep_Pandey

  • Use the “Invoke Method” activity to invoke the “SetOrdinal” method of the columns collection of the data table.
  • Pass the column name and the desired position index as arguments to the “SetOrdinal” method.

Hope this helps,
Best Regards.

1 Like

I have done but its giving error in null

Hi @Kuldeep_Pandey
Using this query you can arrange the column.

Pass your data table column names in the place of Column1, Column2…

Hope this helps


Try doing it like this:

  • Target Object: DataTable.Columns
  • Method Name: SetOrdinal
  • Parameters -
  • Parameter 1: “ColumnName” (Type: String) - the name of the column you want to move.
  • Parameter 2: “Position” (Type: Int32) - the zero-based index of the new position for the column.

Best Regards.

Hi @Kuldeep_Pandey ,

Let us know what have you implemented. Maybe a Screenshot of the implementation would help us navigate to the cause and provide a fix suggestion.



You can do it using read range. first read range which you want to be in 1st place then get then the remaining columns giving seprate range. firstly get the count and save it some variable

now write range using same Range like “A1:C”+RowCount and then put your middle column as range D1:D+RowCount and then write remaining rows like “E1:BG”+RowCount

1 Like

See My parameters

@Kuldeep_Pandey ,

Try setting it as mentioned by @arjunshenoy in the post above.

Let us know the details after.

Hey @Kuldeep_Pandey
Can you just try with what @Suraj_B_Shetty mentioned?

That worked for me

Input :

Output :


Hey please try this workflow it will help you to set the column in the desired position you need.

SerOrdinal.xaml (8.6 KB)


Sreejith S S