I have a Data table(Dt) where the values are get from excel application, and I have a another data table (NewDt) which i declare manually. (Dt) Data table have multiple columns. No.of Columns in the Dt and NewDt are same but the column name differs.
I need to copy each and every row item into the (NewDt) Data table.
Either something went off on my side, or you’re still using V7 compatibility activities (UiPath.Activities namespaces). If that is so, I’d highly recommend using new ones (from UiPath.Core).
You can read two excels into datatables, use the logic I shared earlier & copy both the tables into one.
Then you can write the final output to anywhere.
Use assign activity to change column names in the datatable with below code.
dataTable.Columns(<ColumnIndex / ColumnName>).ColumnName = “Required Column Name”
For example i have excel with Column A to Column AL i need to read only Column A to Column Z the rows are not in fixed number it will change every time.
Use getRange Activity to find used range & get total number of rows
Then use read range, specify the column range as per your need & row count as you got from getRange activity