I have an excel sheet with n number of columns.
- I need to add a column (say “XYZ”) to that sheet.
- I need to fetch the index of that column and add data to each of the rows in that column.
How can I achieve this ?
Kindly help.
I have an excel sheet with n number of columns.
How can I achieve this ?
Kindly help.
can u pls refer this
https://www.uipath.com/kb-articles/how-to-use-insert-datatable-activity
Regards
B.S
Doesn’t help. Kindly provide a detailed explanation.
I have the entire sheet saved in a datatable Dt. I have added a column to Dt using “Add Data Column”. Now I need to add data to that column.
The data needs to be a concatenation of the 3rd and 7th columns.
How can we achieve this ?
Hi @susbasu,
If you need to update a specific col in a specific row then the syntax would be like:
dt.Rows(rownum).Item(“ColName”) = value
You can also use LINQ queries to achieve the same.
Feel free to lookup in the forum, someone might already have posted a solution.
Happy automating!
Thanks Priya!
Have tried Excel’s “Concatenate” formula in the Write Cell activity and ran a for loop through the table. Consumes a hell of time though.
Let me try the one you suggested! Any idea how much time it takes to write 6000 rows using the approach you mentioned ?
Appreciate your efforts!
Thanks,
Sush
I know for sure it works flawlessly, but not sure how long it would take. Please try and let me know how long it takes for you.
Thanks!
Another way is create a DataColumn Variable say “newCol”
using Assign Activity
newCol = dt.Columns.Add("XYZ", GetType(String), "[Col 3 Name]+[Col 7 Name]")
Thanks Vinay! This worked!