Solved
A very basic example of how to write out to a text file is given at https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqfile/writetotextfile.html
To write to a CSV is simply to take that code and modify it to update the output to be comma delimited rows.