How to shift cells right side

excel
activities

#1

Hi,


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


#2

Hey @preethi

it returns Datatable as a result.

Use this DataColumn.SetOrdinal Method (Int32)

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

Regards…!!
Aksh


#3


#4

image

@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)

Regards…!!
Aksh


#5

Hi Akshy

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


#6

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


#7


i want it in this manner


#8

this is my present datatable


#9

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


#10

no i want 1st cell to shift right


#11

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:


#12

ok i will delete column 3


#13

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.