Add Multiple columns into excel file


#1

Hi All,

In excel file i want to add 5 columns ,Like “Test21 , Test22 , Test23,Test24,Test25” in between Column “Month” And “Year”…

Please design workflow with my excel file…

Please find file below
Test1.xlsx (15.0 KB)


#2

Hi @SagarSB,

Hotkeys can be used to insert Columns.
Alt + h+i+c

Please find the workflow attached.
Insert_Multiple_columns.xaml (13.9 KB)


#3

Hi
Please find attached worksflow.
You can use Column.SetOrdinal(position) in invoke Method activity to change your column position in your datatable.
ColumnSetOrdinal.xaml (7.1 KB)


#4

Thank You so much @Bharat


#5

@Bharat
i am getting error:

Source:Invoke Code
Message:Exception has been thrown by the target of an invocation

Exception Type:TargetInvocationException


#6

@SagarSB it’s working fine on my machine, Can you check the exception message.
You can use it without invoke code. Use Invoke method with the following properties:

image

Thanks