Appending records to a CSV file
We often need to add records or even logs to a CSV file. In this scenario, we will be writing the calculated results to a CSV file. Each row that we calculated will be a separate row in the output CSV file.
Your first bot has already been able to perform the following tasks:
- Create a CSV file.
- Read records from a CSV file.
- Perform calculations for each row in the CSV file.
We have all the information that needs to be added to the output file. Before we actually add this, we will need to convert the numMonthly
variable to a string. This is because we cannot output a numeric value as a string to the output CSV file.
To convert this variable and add the record to our output CSV file, perform the following steps:
- Drag the Number: To string action just below line 15, ensuring it is within the Loop action on line 7.
- Set the following properties for the String: Assign action on line 16:
Enter a number:
$numMonthly$
Enter...