Writing a list to a text file

Pretty easy project here. I want to write a multi line list to a text file to readable in notepad on a pc on an SD card. I am able to write all the data to the file except for making it go to the next line. What character or characters do I need in the sprintf statement to make the next data set appear on the next line? I though it was \n but that isn’t doing it. I also tried \r\n that I saw in some post. No joy there either.

Linux environment will interpret '\n' as a line feed.
But on Windows it must be "\r\n"

Not sure why it won't work. But I guess you know what to do next.

adwsystems:
I want to write a multi line list

The essential word here is "list". Assuming it is a stream of data items from
Serial.print(item);
You simply command
Serial.println(item);
for the last one in the line.

What you want to do is not entirely clear, but typically, one might collect data items in a trip around the loop, and then print them to a csv file with comma separators, for use in Excel or the like. The last one gets the ln, no comma needed there, and then you go round for the next lot.
The procedure for datafile.print to SD card is the same

Ok, so println works. What does it put at the end of the line that a string containing \n\0 does not?

adwsystems:
What does it put at the end of the line that a string containing \n\0 does not?

Clearly, the code necessary to achieve the intended result.

It adds "\r\n".

It does not add '\0'.