I have data collection from a web page and I have assigned them to variables. Now I have created a (built ) data table with all column names. I need to add these data to data table rows one after another.
For. ex: row A is filled with data in data table now in 2nd iteration row B should be filled with data likewise we need to complete the data table rows
the issue that I am facing is: the values in the data table are getting overlapped and the final output is only one data row with last iteration data.
I have tried using the add data row but it is not working and the values are getting added to the same data row instead of the next row.
Can anyone have a sample XAML file to help me out?
Thanks in advance
Are u defining the build datatable activitiy inside the loop
If yes then put it outside the loop then use add datarow inside the loop
To view the final data in Excel file use write range activity outside the loop to get all data in datatable to.be written in excel file
1.Read the data using Read Range activity.
2.Use Assign activity to increase the count(eg : RowCount = Datatablename.Rows.Count+1)
3.Then you can built the datatable using Build Data Table activity.
4.Add data row using Add Data Row Activity.
5.Then as a last step we need to write the data using Write range activity and can give (eg :“A”+RowCount.ToString ) in the starting cell of the Write Range Activity.
Thank you for the suggestion,
Actually, I was putting the data table inside the loop