-1

I'm making a short game for one of my classes, its for a small research study, so i want to be able to write the participants game data to a new line in a spreadsheet. I've seen stuff on reading from a .csv file but nothing about writing to it and was wondering what i need to do for that.

nightblen
  • 1
  • 1

1 Answers1

0

CSV, as per the name, is a very simple format - items go one per line and are separated by commas. If the item contains a comma or is multi-line, it should be surrounded by double-quotes ". If the item also needs to contain double quotes, they are replaced by pairs of double quotes "".

name,value
ex1,hello
ex2,"hello, you!"
ex3,"hello, ""quotes""!"
ex4,"hello,
lines!"

Rest assured, this is not hard to produce with file_text_* or buffer functions. You can check this implementation for an example.

YellowAfterlife
  • 2,967
  • 1
  • 16
  • 24