CSV
The CSV file format is used to create text files for storing or exchanging data. The abbreviation stands for “comma-separated values”. There are no uniform standards for the file structure, so tables or lists in the form of separated values can be contents of the file. If more complicated processes are to be controlled, the file formats XML or EDI are often used instead of CSV. Nevertheless, it is also possible to map nested data structures with CSV files.
Application areas of CSV files
CSV files are basically simple text files that store data in ASCII format. Almost every computer program understands this simple format. If a database table is transferred into the CSV format, then data can be exchanged also between actually incompatible programs. Another special application is the password file of the UNIX user administration. A CSV file is also used here, but a colon rather than a semicolon is used as the separator. Please note that only text can be transferred via CSV file. Embedding graphics or audio files is not possible.
Creating CSV files
To generate a CSV file, no special program is necessary. A simple text editor is sufficient. However, the file can be created more comfortably if a spreadsheet program is used. The contents can be displayed more clearly, the operation is more comfortable. In the file itself, separators are used to separate individual data records. Furthermore, each CSV file has a header that defines the type of data it contains. Analogous to the structure of a table, this header corresponds to the column headers. Line breaks and semicolons are used as separators. While the line break separates complete data sets, the semicolon separates the individual data within a data set. When created within a spreadsheet, these separators do not need to be used, each cell separates the data within a record, each row contains exactly one record.
Opening CSV files
There are several ways to open a CSV file. If you want to open the file and view it in “raw” form, i.e. with line and semicolon separation, you choose a text editor, in table format the file is displayed when opened with a spreadsheet program. With all MS Excel versions up to 2003 this is possible without problems, also Open Office opens a CSV file without problems and offers a preview of the original table. Other possibilities are the use of freeware products. If you want to edit CSV files with newer Excel versions, a detour is necessary. However, opening and reading usually succeeds without problems.