How to shift cells right side


i got this data by data scraping i need to shift 1 colum to right side
output needed

Hey @preethi

it returns Datatable as a result.

Use this DataColumn.SetOrdinal Method (Int32)

Example: - dataTable.Columns[“Colname”].SetOrdinal(1)



@preethi in above you have to pass at what order you want your column so for example you want your column to be at 9th position then pass it 9 to setordinal.

Here if you wants your blank column to appear at last then just get the YourDatatable.Columns.Count and use that index.

For your reference check this workflow dataScrapping (1).xaml (8.5 KB)


Hi Akshy

its swapping the columns i don’t want that to happen i want to shift it to right

can you give more info? you want it after description?or at then end?

i want it in this manner

this is my present datatable

ok got it you wants to shift all columns data by one cell?

no i want 1st cell to shift right

but what about the column 3 also coming you have to skip that and write to the next columns? Have to check then… logout time :slight_smile: will see or may be @andrzej.kniola will help till then :slight_smile:

ok i will delete column 3

one way you can rename column names also like this

dataTable.Columns[“Col0”].ColumnName = “Name”; Similarly more I guess

or delete col3 and create a new datatable with your own header then import just datarows from first datatable to new datatable.

1 Like