Hi all, I would like to ask a question regarding adding on data to an excel from another excel.
I am trying to add a row of data to the output excel, however the columns of the excel do not match. For example in the Input excel, the column name 'Vendor" is in column 1, but in the Output excel it is in column 10.
Could I somehow do a make datatable and add the data respectively?
Try using column headers rather than using column number
Or get the index of the columns u
For eg:
Put for each loop row activity and iterate through rows using column headers
Assign
- CompanyIndex = dtOutput.Columns.IndexOf(“Company”)
-EmployeeIDIndex = dtOutput.Columns.IndexOf(“EmployeeID”)
- SurnameIndex = dtOutput.Columns.IndexOf(“Surname”)
-AddressIndex = dtOutput.Columns.IndexOf(“Address”)
You’re welcome! I’m glad to hear that my answer has reassured your thinking. If you have any more questions or need further assistance with anything else, feel free to ask. Happy automating with UiPath!