Insert new cells for some columns

Hello everyone,
i have a table of invoices and CNs ,is it possible to insert cells in columns C for example only for CNs and shift all columns after Column c to the right side, in order to keep cells in columns c for CN empty.
Thanks for any idea :slight_smile:

1 Like

Hey @hussam_alsabbagh

You can perform the below,

  1. Read the Excel into a datatable

  2. Add the column to the datatable dt_data.Columns.Add("colname")

  3. Set the column position into the table using Invoke Method activity by invoking function SetOrdinal(2)

Hope this helps

Thanks
#nK

1 Like

Hello Nithin,
thank you for help but can you please make a xaml for me , becasue i am new in uipath.
Best regards
Hussam

1 Like

Hey @hussam_alsabbagh

I request you to please try the above steps.

If you face any issues please let us know.

Even then if it not helps, we can try for a demo.

Hope this helps.

Thanks
#nK

Hello Nithin,

i tried it many times , but somehow it does not work with me, maybe i need to learn more about the invoke method activity.
thanks again.
Hussam

Hi @hussam_alsabbagh
Please find the attached sample xaml file
SetOrdinalExample.zip (9.7 KB)

2 Likes

Hey @hussam_alsabbagh

Kindly try the one suggested by @vaibhavinnovation79

Thanks
#nK

1 Like