From c0c813639a014d4ac3a9a3f3cb113bd1dab71a90 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Wed, 1 Dec 2021 14:13:38 -0300 Subject: tdf#117868 Help contents for sep= in CSV files Change-Id: I6ac919fd95b9c30be3f1f2aa7bc18efd40b6d2d7 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126188 Tested-by: Jenkins Reviewed-by: Eike Rathke (cherry picked from commit 4973d1a792d20d77e7401c1d2b1fe9821695297d) Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126231 --- source/text/shared/guide/csv_params.xhp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/source/text/shared/guide/csv_params.xhp b/source/text/shared/guide/csv_params.xhp index 2ac056ad5e..ef54bfc613 100644 --- a/source/text/shared/guide/csv_params.xhp +++ b/source/text/shared/guide/csv_params.xhp @@ -18,6 +18,7 @@ CSV;filter options + CSV;separator specification line CSV;import options CSV;export options CSV;command line filter options @@ -201,6 +202,26 @@ +

Special case of CSV files with separator defined in the first line

+ + CSV import and export support a sep= and "sep=" field separator setting. When reading a CSV document, the separator is taken from the initial sep= or "sep=" single field, if that is the only line content. + + When reading a CSV file, the quoted form is preserved as (unquoted) cell content. You see sep=| when | is the separator in the first line. In the unquoted form, the separator is discarded because it is a real field separator in the context. You see sep= in the first line. + + When writing a CSV file, the existing single top left cell's content such as sep=| is adapted to the current separator with the quoted form of "sep=|" (if quotes / text delimiters aren't set empty and | is the separator) and always uses the ASCII " double quote character. + + If the line containing the sep=| is not to be imported as data, remember to set the From row number in the dialog to 2. Note that this line will not be preserved when re-saving. + + + + + sep=| + "LETTER"|"ANIMAL" + "a"|"aardvark" + "b"|"bear" + "c"|"cow" + +

Formatting Codes for Token 5

-- cgit