Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Comma-separated values
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Application support== Some applications use CSV as a [[Data exchange|data interchange format]] to enhance its [[interoperability]], exporting and importing CSV. Others use CSV as an ''internal format''. As a data interchange format: the CSV file format is supported by almost all spreadsheets and database management systems, * [[Spreadsheet]]s including Apple [[Numbers (spreadsheet)|Numbers]], [[LibreOffice Calc]], and [[Apache OpenOffice]] Calc. [[Microsoft Excel]] also supports a dialect of CSV with restrictions in comparison to other spreadsheet software (e.g., {{as of|lc=y|2019}} 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 <code>COPY</code> command, which allows for both saving and loading data to and from a file. {{code|2=postgres|COPY (SELECT * FROM articles) TO '/home/wikipedia/file.csv' (FORMAT csv)}} saves the content of a table <code>articles</code> to a file called <code>/home/wikipedia/file.csv</code>.<ref>{{cite web|url=https://www.postgresql.org/docs/current/sql-copy.html |title=Documentation: 14: COPY |publisher=PostgreSQL |accessdate=2024-05-12}}</ref> * Many utility programs on [[Unix]]-style systems (such as [[Cut (Unix)|cut]], [[Paste (Unix)|paste]], [[Join (Unix)|join]], [[Sort (Unix)|sort]], [[uniq]], [[AWK|awk]]) can split files on a comma delimiter, and can therefore process simple CSV files. However, this method does not correctly handle commas or new lines within quoted strings, hence it is better to use tools like csvkit or Miller. As (main or optional) internal representation. Can be [[Native and foreign format|native or foreign]], but differ from interchange format ("export/import only") because it is not necessary to create a copy in another format: * Some [[Spreadsheet]]s including [[LibreOffice Calc]] offers this option, without enforcing user to adopt another format. * Some relational databases, when using standard SQL, offer ''foreign-data wrapper'' (FDW). For example, PostgreSQL offers the {{code|2=postgres|CREATE FOREIGN TABLE}}<ref>{{cite web|url=https://www.postgresql.org/docs/current/postgres-fdw.html |title=Documentation: 14: F.35. postgres_fdw |publisher=PostgreSQL |date=2022-02-10 |accessdate=2022-03-04}}</ref> and {{code|2=postgres|CREATE EXTENSION file_fdw}}<ref>{{cite web|url=https://www.postgresql.org/docs/current/file-fdw.html |title=Documentation: 14: F.14. file_fdw |publisher=PostgreSQL |date=2022-02-10 |accessdate=2022-03-04}}</ref> commands to configure any variant of CSV. * Databases like [[Apache Hive]] offer the option to express CSV or [[gzip|.csv.gz]] as an internal table format. * The [[emacs]] editor can operate on CSV files using csv-nav mode.<ref>{{Cite web|url=https://www.emacswiki.org/emacs/CsvNav|title=EmacsWiki: Csv Nav|website=www.emacswiki.org}}</ref> CSV format is supported by libraries available for many [[programming language]]s. Most provide some way to specify the field delimiter, [[decimal separator]], character encoding, quoting conventions, date format, etc. ===Software and row limits=== Programs that work with CSV may have limits on the maximum number of rows CSV files can have. Below is a list of common software and its limitations:<ref>{{cite web | url=https://www.import2.com/csv/understanding-csv-and-row-limits | title=Understanding CSV and row limits | access-date=Feb 28, 2021 | archive-date=January 15, 2021 | archive-url=https://web.archive.org/web/20210115142749/https://www.import2.com/csv/understanding-csv-and-row-limits | url-status=live }}</ref> * Microsoft Excel: 1,048,576 row limit; * Microsoft PowerShell, no row or cell limit. (Memory Limited) * Apple Numbers: 1,000,000 row limit; * Google Sheets: 10,000,000 cell limit (the product of columns and rows); * OpenOffice and LibreOffice: 1,048,576 row limit; * Sourcetable:<ref>[https://sourcetable.com large data spreadsheet] Sourcetable Inc., 2024. Retrieved 2024-11-14.</ref> no row limit. (Spreadsheet-database hybrid); * Text Editors (such as [[WordPad]], [[TextEdit]], [[Vim (text editor)|Vim]], etc.): no row or cell limit; * Databases (COPY command and FDW): no row or cell limit.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)