Add column

I did a add column activity but when i open excel the extra column is not there. Any idea?

After adding column, have you used write range activity to write updated datatable to excel.

Hi @seanp92

1.Use Add data column in properties pass Column Name and Data table.
2.In data table where you add column position use Invoke method.
TargetObject(DataTable.Columns(“COlumnName”))
MethodName(SetOrdinal)
in properties panel parameters set position of the column
3.And then use Write Range in the properties check add headers.

Regards,
Kommi Jeevan.

Hi @seanp92

If you Add a column this column will add only in Data Table not in your sheet, so use Write Range to add it in your Excel Sheet.

Hi @seanp92’

Add_column.zip (29.2 KB)

plz check this zip.file

After adding column use write range activity and enable the add headers

Regards,
Gulshiyaa

tried your method but no column gets added

Send me your workflow,I will check and let you know

Test.zip (19.2 KB)

1.Read existing excel sheet and take data into datatable DT
2.Use Add data column in properties pass Column Name and Data table(DT).
3.In data table(DT) where you add column position use Invoke method.
TargetObject(DataTable.Columns(“COlumnName”))
MethodName(SetOrdinal)
in properties panel parameters set position of the column
4.And then use Write Range provide data table name(DT) and in the properties check add headers.

Amol can you upload a example?

see you didn’t enable the add headers check box

1 Like

image why does it add 3 columns then the name?

@seanp92 If you find it useful mark it as solution and close the thread.

I did thank you!

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