5,418
edits
Changes
From Gramps
m
On the All list table views have a CSV Dialect tab you in the dialog for the View -> Configure... menu. You can choose the CSV format for the 's delimiter to be used when exporting this viewand importing data in Gramps.
→CSV Dialect: expand the description of CSV Dialect
====CSV Dialect====
{{stub}}<!-- new in Gramps 5.2-->
Choose from:
*** 'tab'
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 `excel`, `excel-tab`, and `unix`. This document outlines each dialect's characteristics, including its separator, line terminator, and quoting behavior. ===== Excel Dialect ===== The `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>)*Quoting:** Double quotes (<code>"</code>`) are used to enclose fields containing the separator or other special characters.** To include a double quote within a quoted field, it is escaped by doubling it (e.g., <code>""example""</code>). ===== Excel-tab Dialect ===== The `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>)* Line Terminator: Carriage return and line feed (<code>\r\n</code>)* Quoting:** Double quotes (<code>"</code>) are used to enclose fields containing the separator or other special characters.** To include a double quote within a quoted field, it is escaped by doubling it (e.g., <code>""example""</code>). ===== Unix Dialect ===== The `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>)* Line Terminator: Line feed (<code>\n</code>)* Quoting:** All fields are enclosed in double quotes (<code>"</code>).** To include a double quote within a quoted field, it is escaped by doubling it (e.g., <code>""example""</code>). ===== See also:=====
* [https://github.com/gramps-project/gramps/pull/1314 CSV: possibility to select the dialect. #1314 ]
{{-}}