I have been trying to append the datarow value into the Excel file, But getting stuck while adding the rows in the Add Datarow activity.
The values of column3 is multiple in case of some of the transaction. As i am using for each loop to get the values,
But i am not getting how to write the values in column 3 so that for next transaction the row must start from the end of Column3
You don’t use Add Data Row to write to Excel. Add Data Row is for adding a row to a datatable. If you want to write to Excel, use the Excel activities - Write Row, Write Range, Append Range etc.
@mayankjha986 May I know why you are adding rows and then inserting data into the datarow. You can also read the whole data into a data table directly with the same format
@ushu , I am getting all these values from an web application , getting rest of the values using get text activity and string the values in a variable, and for col3, Extracting the Table and iterating over each row using for each loop, All the variable are being exported to data row correctly but for col3 getting the last row value from the loop.
@postwick is correct, “Add Data row” is for Data Tables stored in UiPath. Are you using “Read Range” to store the data in a data table? That would be required to use “Add Data row”.
Is there any way where i can store all the values from the loop in an array / list and can store the value in the last into add datarow as expected
Use “Build Data Table”
Use “Add Data row” to add your found values to the data table you just built
Use “Append Range” to append that data table to your excel file
@ushu Thanks for the answer.
In the given workflow file only the data from excel has been appended,
i am expecting to get the city column value from the Excel into an Array, inside an for each loop, which can be exported to datarow in an separate rows for each Transaction.
Alongwith the other variable values.
Need your suggestion