You don’t want to loop and write one row at a time. As your process runs, update the datatable and then at the end use Write Range (if a new file) or Append Range (if an existing file) to write the data to Excel.
Yes i want to loop and write a row at time, but the same file is in different part on my code, so i need to open the reporting file and use “row.count” every time to count but it doesnt work
did i need to use different count variable names (for each part) ?
why my method is not working ? If i open the same file and use row.count it suppose to count the new number of row no ?
1-> create a CSV file using Write Text File Activity with your necessary headers
2-> alway you need to add new line, use Append Line Activity using comma to separate the information
You can use wherever you want just use the same file
3-> When you want the final excel, you can use Read CSV Activity then Write Range Workbook Activity
Probably the index you are using to update doesn’t increase for every update
The easist way to find the issue is run the process in Debug Mode going through each activity and look at Local Panel to see the current value
Using your approch will work fine, but you will have more difficult to troubleshooting when you have some issue like this because the logic to update will distribute to entire workflow.
If you update something in a specifc place maybe impact the final report result