CSV is commonly used for
data exchange and is widely supported by data-oriented
applications. It is often used to move tabular data between programs that natively operate on incompatible data often in formats that are
proprietary or undocumented. A common scenario is moving data from a database to a spreadsheet which, in general, use completely different formats. Most database systems can export as CSV and most spreadsheet programs can import CSV-formatted data, leveraging CSV as an intermediate format. Every major
ecommerce platform provides support for exporting data as a CSV file. CSV is also used for storing data. Common data science tools such as
Pandas include the option to export data to CSV for long-term storage. Benefits of CSV for data storage include the simplicity of CSV makes parsing and creating CSV files easy to implement and fast compared to other data formats, human readability making editing or fixing data simpler, and high compressibility leading to smaller data files. Alternatively, CSV does not support more complex data relations and makes no distinction between null and empty values, and in applications where these features are needed other formats are preferred. More than 200 local, regional, and national data portals, such as those of the
UK government and the
European Commission, use CSV files with standardized
data catalogs. Some applications use CSV as a
data interchange format to enhance its
interoperability, exporting and importing CSV. Others use CSV as an internal format. CSV is supported by almost all spreadsheets and database management systems.
Spreadsheets including Apple
Numbers,
LibreOffice Calc, and
Apache OpenOffice Calc. support reading CSV files.
Microsoft Excel also supports a dialect of CSV with restrictions in comparison to other spreadsheet software (e.g., Excel still cannot export CSV files in the commonly used UTF-8 character encoding, and separator is not enforced to be the comma).
LibreOffice Calc CSV importer is actually a more generic delimited text importer, supporting multiple separators at the same time as well as field trimming. Various
relational databases support saving query results to a CSV file.
PostgreSQL provides the COPY command, which allows for both saving and loading data to and from a file. saves the content of a table articles to a file called /home/wikipedia/file.csv. Some relational databases, when using standard SQL, offer
foreign-data wrapper (FDW). For example, PostgreSQL offers the and commands to configure any variant of CSV. Databases like
Apache Hive offer the option to express CSV or
.csv.gz as an internal table format. Programs that work with CSV may have limits on the maximum number of rows CSV files can have. Examples include Microsoft Excel (1,048,576 rows), Apple Numbers (1,000,000 rows), Google Sheets (10,000,000 cells), and OpenOffice and LibreOffice (1,048,576 rows). == See also ==