Heloo guys,
how can i add a column name on a specific column index using Data Table activity instead of write cell
since the excel is having large data it is taking more time while using Write cell
Heloo guys,
how can i add a column name on a specific column index using Data Table activity instead of write cell
since the excel is having large data it is taking more time while using Write cell
Check the below thread
Syntax:
dt_Result1.Columns.Add("").SetOrdinal(6)
Change the number accordin to yours and within doubke quotes give your column name.
Let me know if you have any issues
Regards
Hi @Gokul_Murali ,
Could you maybe check with the below post :
When using SetOrdinal
method, first add the column to the Datatable using Add Data Column
activity and then use the SetOrdinal
method.
We could also re-arrange the columns if we do know the column arrangements and all the columns required for the output using the DefaultView.ToTable()
method.
Test case.zip (8.9 KB)
Please check the below zip file.
FLOW:
CODE:
dt_PR.Columns.Add("GOC").SetOrdinal(66)
INVOKED ARGUMENTS:
ZIP FILE:
Add column to datatable.zip (47.8 KB)
Let me know if you have any issues.
Regards
Bro check that I have change the code in Invoke Code.
dt_PR.Columns.Add("GOC").SetOrdinal(66)
If this doesn’t work please update UiPath.System.Activities to the latest version.
Regards
Check that i have changed the code:
dt_PR.Columns.Add("GOC").SetOrdinal(66)
Instead of 67 give 66
Regards
Hi @Gokul_Murali ,
U can achieve the same by using
syntax :- dt_Result1.Columns.Add("Column name ").SetOrdinal(Columnposition-1)
Regards
Sandy
Bro i have tried it but the same case