Home > Common Problem > What format file is csv?

What format file is csv?

青灯夜游
Release: 2023-02-01 10:29:04
Original
154526 people have browsed it

The full name of csv is "Comma-Separated Values", which is a comma-separated value format file and a plain text format file used to store data. A CSV file consists of any number of records, separated by certain line breaks; each record consists of fields, and the separators between fields are other characters or strings.

What format file is csv?

#The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

CSV (Comma-separated values ​​file format)

Comma-Separated Values ​​(CSV, sometimes also called character-separated values, because the delimiting character can also not commas) whose files store tabular data (numbers and text) in plain text. Plain text means that the file is a sequence of characters and contains no data that must be interpreted like a binary number. A CSV file consists of any number of records, separated by some kind of newline character; each record consists of fields, and the separators between fields are other characters or strings, most commonly commas or tabs. Typically, all records have exactly the same sequence of fields. Usually these are plain text files. It is recommended to use WORDPAD or Notepad to open it, and then save a new file first and then open it with EXCEL. This is also one of the methods.

A universal standard for the CSV file format does not exist, but there is a basic description in RFC 4180. The character encoding used is also not specified, but bitASCII is the most basic universal encoding.

CSV is a versatile, relatively simple file format widely used by users, business and science. The most widespread application is for transferring tabular data between programs that themselves operate on incompatible formats (often proprietary and/or non-canonical formats). Because a large number of programs support some variant of CSV, at least as an optional input/output format.

For example, a user may need to exchange information from a database program that stores data in a proprietary format to a spreadsheet with data in a completely different format. Most likely, the database program can export the data as "CSV" and the exported CSV file can then be imported by a spreadsheet program.

"CSV" is not a single, well-defined format (although RFC 4180 has a commonly used definition). Therefore in practice, the term "CSV" refers broadly to any file that has the following characteristics:

  • Plain text, using a certain character set, such as ASCII, Unicode, EBCDIC or GB2312;

  • consists of records (typically one record per line);

  • Each record is separated into fields by a delimiter (a typical delimiter is a comma , semicolon, or tab; sometimes delimiters can include optional spaces);

  • Each record has the same field sequence.

Under these general constraints, there are many CSV variants, so CSV files are not completely interoperable. However, these variations are very minor, and there are many applications that allow the user to preview the file (which is possible since it is plain text) and then specify delimiters, escaping rules, etc. If the variation in a particular CSV file is too large to be supported by a particular receiving program, then the feasible approach is often to manually inspect and edit the file, or to fix the problem through a simple program. Therefore, in practice, CSV files are still very convenient.

If you want to read more related articles, please visit PHP Chinese website! !

The above is the detailed content of What format file is csv?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template