Once written to the file, everything is a "string", even your data is just a string of decimal number characters, etc.
Just format an entire line using "format date/time string", "array to spreadsheet string", etc. and concatenate them all with appropriate spacers (tab, space, comma, etc) and a "newline" at the end.
Append this final single string to your data file at each iteration.