© 2004-21

CSV File Handling

A CSV file (Comma Separated Value) is a data file where the contents are highly structured.
Each of the data items are separated by commas, and the line ends with a new line character (This can't normally be seen as it's a non printing character).
They look like this:

Click here to download a sample CSV file

Method Description
Read CSV data Read data from a CSV file
CSV File read and append Read and append to a CSV file using a loop to control the file append
CSV File read and write Read and write a CSV file using the methods from the CSV module
File exists Use the file system to see if a file exists