How to add data column in the first column of extracted data?

I have extracted data table with data scraping. Before writing it to an excel, I add customer number data with “add data column” activity and write it to each row. But it always writes to the end of each data in rows in excel. I need to place that at A column.
Could you please help?

1 Like

Hi @aysyavuz

Hope this would help you for sure buddy

Here the set ordinal is used to add the datacolumn at desired position and here in the xaml attached will have set at Column B with 1
you can mention as 0 to get added at first column

Here you go with that sample xaml
add (2.6 KB)

For more info on this

Kindly revert for any queries

1 Like


Have you tried using InsertAt predefined class?

Use this : ExtractDataTable.Rows.InsertAt(New entire row , position you want) …

So the steps you need to do is :

  1. Make the new data as a data row
  2. use the above condition to add at a specific position

Hi @Palaniyappan,
It works perfectly :slight_smile:

Thanks a lot,

1 Like

Cheers @aysyavuz
Kindly close this topic buddy with right comment marked as solution tht could help others

I’ve marked it as solution. Thank u @Palaniyappan

1 Like

Hi @aysyavuz
You can use UiPath.Excel.Activities.ExcelInsertColumn or UiPath.Excel.Activities.ExcelInsertDeleteColumns


You can find more information about this here:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.