Open main menu

Gramps β

Changes

Gramps 5.2 Wiki Manual - Settings

1,078 bytes added, 03:36, 15 February 2025
m
CSV Dialect
====CSV Dialect====
{{stub}}<!-- new in Gramps 5.2-->
CSV stands for '''[https://wikipedia.org/wiki/Comma-separated_values comma-separated values]'''. It is a plain text file format that separate data into columns and rows for simple way to exchange data. Originally, data was limited by being separated into columns by fixed positions in <code>.txt</code> text files. When more flexibility was needed, the comma was chosen as a delimiter to mark the boundaries of the columns and the <code>.csv</code> format of a text file was established. To complicate matters, different Operating System marked their end-of-line and end-of-file with different terminating codes.  When comma was needed too frequently in the data itself, a <code>.tsv</code> (tab-separated-values) file format became popular. When other delimiters began being adopted, rather than use up more file extensions, CSV became synonymous with any text format with delimiter marked columns. They were just different 'dialects' of "CSV". All list table views have a CSV Dialect tab in the dialog for the {{man menu|View -> Configure... }} menu. You can choose the CSV format's delimiter to be used when exporting and importing data in Gramps.
Choose from:
*** 'tab'
[https://docs.python.org/3/library/csv.html Python's <code>csv</code> module ] provides several pre-defined dialects to simplify reading and writing CSV files. These dialects specify rules for parsing and formatting data. The standard dialects include `{{man label|excel`}}, `{{man label|excel-tab`}}, and `{{man label|unix`}}. This document outlines each dialect's characteristics, including its separator, line terminator, and quoting behavior.
===== Excel Dialect =====
The `{{man label|excel` }} dialect is designed to be compatible with CSV files generated by Microsoft Excel. It is suitable for data that has been saved from Excel as comma-separated values.
*Separator:** Comma (<code>,</code>`)
*Line Terminator: Carriage return and line feed (<code>\r\n</code>)
===== Excel-tab Dialect =====
The `{{man label|excel-tab` }} dialect is similar to the `excel` dialect but uses tabs instead of commas as the separator. This format is often encountered when copying cell data from Excel to the OS clipboard. Pasting tab separated data into the [[Addon:Import_Text_Gramplet|Import Text]] addon gramplet is one of the quickest way to populate parts of your tree.
* Separator: Tab (<code>\t</code>)
===== Unix Dialect =====
The `{{man label|unix` }} dialect is designed for use in Unix-like environments. It uses a line feed character as the line terminator and always quotes all fields.
* Separator: Comma (<code>,</code>)
5,418
edits