summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Balland <laurent.balland@mailo.fr>2023-05-30 21:46:27 +0200
committerLaurent Balland <laurent.balland@mailo.fr>2023-06-15 18:30:25 +0200
commitef0e2a4bf333ba01d2e3fd81ad9e4b14fb205e4d (patch)
tree91ea20d5bdf2fad7e711c9f4a05bc5673b5cd5a9
parentBranch libreoffice-7-6 (diff)
downloadhelp-ef0e2a4bf333ba01d2e3fd81ad9e4b14fb205e4d.tar.gz
help-ef0e2a4bf333ba01d2e3fd81ad9e4b14fb205e4d.zip
tdf#154131 Detect numbers in scientfic notation
Add a new option to CSV params Add help to dialog Change-Id: If812698a5083cc19431d6de6c2439d2879baa1f7 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/152407 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> (cherry picked from commit a8a5edeadd66edfc0fb0747ba7f1251da1b2597c) Reviewed-on: https://gerrit.libreoffice.org/c/help/+/152983
-rw-r--r--source/text/shared/00/00000208.xhp13
-rw-r--r--source/text/shared/guide/csv_params.xhp15
2 files changed, 23 insertions, 5 deletions
diff --git a/source/text/shared/00/00000208.xhp b/source/text/shared/00/00000208.xhp
index 0e6ce5b98e..38cdfd518b 100644
--- a/source/text/shared/00/00000208.xhp
+++ b/source/text/shared/00/00000208.xhp
@@ -108,11 +108,18 @@
<bookmark xml-lang="en-US" branch="hid/modules/scalc/ui/textimportcsv/detectspecialnumbers" id="bm_id315790922" localize="false"/>
<h3 id="hd_id314847422">Detect special numbers</h3>
-<paragraph id="par_id314995722" role="paragraph" xml-lang="en-US"><ahelp hid=".">When this option is enabled, Calc will automatically detect all number formats, including special number formats such as dates, time, and scientific notation.</ahelp></paragraph>
+<paragraph id="par_id314995722" role="paragraph" xml-lang="en-US"><ahelp hid=".">When this option is enabled, Calc will automatically detect all number formats, including special number formats such as dates and time. Scientific notation will also be detected as <emph>Detect scientific notation</emph> option must be enabled at the same time.</ahelp></paragraph>
<paragraph id="par_id314995723" role="paragraph" xml-lang="en-US">The selected language influences how such special numbers are detected, since different languages and regions many have different conventions for such special numbers.</paragraph>
-<paragraph id="par_id314995724" role="paragraph" xml-lang="en-US">When this option is disabled, Calc will detect and convert only numbers in decimal or scientific notation. The rest will be imported as text. A decimal number string can have digits 0-9, thousands separators, and a decimal separator. Thousands separators and decimal separators may vary with the selected language and region.</paragraph>
-<bookmark xml-lang="en-US" branch="hid/modules/scalc/ui/textimportcsv/skipemptycells" id="bm_id315790923" localize="false"/>
+<paragraph id="par_id314995724" role="paragraph" xml-lang="en-US">When this option is disabled, Calc will detect and convert only numbers in decimal notation. Detection of numbers in scientific notation will depend on <emph>Detect scientific notation</emph> option. The rest will be imported as text. A decimal number string can have digits 0-9, thousands separators, and a decimal separator. Thousands separators and decimal separators may vary with the selected language and region.</paragraph>
+
+<bookmark xml-lang="en-US" branch="hid/modules/scalc/ui/textimportcsv/detectscientificnumbers" id="bm_id315790921" localize="false"/>
+<h3 id="hd_id314847423">Detect scientific notation</h3>
+<paragraph id="par_id314995721" role="paragraph" xml-lang="en-US"><ahelp hid=".">When this option is enabled, Calc will automatically detect numbers with scientific notation, like 5E2 for 500.</ahelp></paragraph>
+<paragraph id="par_id314995726" role="paragraph" xml-lang="en-US">The selected language influences how scientific notation is detected, since different languages and regions many have different decimal separator.</paragraph>
+<paragraph id="par_id314995727" role="paragraph" xml-lang="en-US">This option can be be disabled only if <emph>Detect special numbers</emph> option is previously disabled.</paragraph>
+<paragraph id="par_id314995728" role="paragraph" xml-lang="en-US">When this option is disabled, Calc will detect and convert only numbers in decimal notation. The rest will be imported as text. A decimal number string can have digits 0-9, thousands separators, and a decimal separator. Thousands separators and decimal separators may vary with the selected language and region.</paragraph>
+<bookmark xml-lang="en-US" branch="hid/modules/scalc/ui/textimportcsv/skipemptycells" id="bm_id315790923" localize="false"/>
<h3 id="hd_id171220172142361711">Skip empty cells</h3>
<paragraph id="par_id171220172144419125" role="paragraph" xml-lang="en-US"><ahelp hid=".">Available when using <menuitem>Paste Special</menuitem>: when this option is enabled, Calc preserves previous content of cells when pasting empty ones. Otherwise, Calc deletes content of previous cells.</ahelp></paragraph>
<paragraph id="par_id171220172156279613" role="paragraph" xml-lang="en-US">In <emph>Text to Columns</emph> conversion, if cell content begins with a separator and this option is disabled, then first column will be emptied.</paragraph>
diff --git a/source/text/shared/guide/csv_params.xhp b/source/text/shared/guide/csv_params.xhp
index a6bcf26e46..4a695e793d 100644
--- a/source/text/shared/guide/csv_params.xhp
+++ b/source/text/shared/guide/csv_params.xhp
@@ -25,7 +25,7 @@
</bookmark>
<section id="csv_params_Head">
<h1 id="hd_id551634734576194"><variable id="csv_params_h1"><link href="text/shared/guide/csv_params.xhp">CSV Filter Options</link></variable></h1>
- <paragraph id="par_id401634734576197" role="paragraph" xml-lang="en-US">The CSV filter accepts an option string containing five to thirteen tokens, separated by commas. Tokens 6 to 13 are optional.</paragraph>
+ <paragraph id="par_id401634734576197" role="paragraph" xml-lang="en-US">The CSV filter accepts an option string containing five to fifteen tokens, separated by commas. Tokens 6 to 15 are optional.</paragraph>
</section>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<paragraph role="paragraph" id="par_id431634743318433">Import from UTF-8, Language German, Comma separated, Text delimiter ", Quoted field as text. CSV file has columns formatted as date, number, number, number:</paragraph>
@@ -134,7 +134,7 @@
</tablecell>
<tablecell>
<paragraph id="par_id41634737061097" role="tablecontent"><emph>Import:</emph> String, either <literal>false</literal> or <literal>true</literal>. Default value: <literal>false</literal>. This token is the equivalent of the check box "Detect special numbers".</paragraph>
- <paragraph role="tablecontent" id="par_id161634737264744"><emph>Export:</emph> String, either false or true. Default value: <literal>true</literal>. This token has no UI equivalent. If <literal>true</literal>, the number cells are stored as numbers. If <literal>false</literal>, the numbers are stored as text, with text delimiters.</paragraph>
+ <paragraph role="tablecontent" id="par_id161634737264744"><emph>Export:</emph> String, either <literal>false</literal> or <literal>true</literal>. Default value: <literal>true</literal>. This token has no UI equivalent. If <literal>true</literal>, the number cells are stored as numbers. If <literal>false</literal>, the numbers are stored as text, with text delimiters.</paragraph>
</tablecell>
</tablerow>
<tablerow>
@@ -219,6 +219,17 @@
<paragraph id="par_id41678874718368" role="tablecontent" xml-lang="en-US">String, either <literal>false</literal> or <literal>true</literal>. Default value: <literal>false</literal>. If <literal>true</literal> include a byte-order-mark (BOM) in the export. If <literal>false</literal> the export does not include a BOM. If omitted (not present at all), the default value is <literal>false</literal> to keep the behaviour of old versions' options string that didn't have this token at all. If present and empty (or any other value than <literal>true</literal>) the default value is <literal>false</literal>. Automatically detected during the import.</paragraph>
</tablecell>
</tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id541678874653433" localize="false" role="tablecontent" xml-lang="en-US">15</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph role="paragraph" id="par_id221678874688126">Detect numbers in scientific notation</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id41678874718367" role="tablecontent" xml-lang="en-US">String, either <literal>false</literal> or <literal>true</literal>. Default value: <literal>true</literal>. If <literal>true</literal> detect if a cell content containing an 'E' or 'e' is a number in scientific notation. If <literal>false</literal> do not try to detect numbers in scientific notation. Token can be <literal>false</literal> only if token 8 (Detect special numbers) is <literal>false</literal>. If omitted, the default value is <literal>true</literal> to keep the behaviour of old versions' options string that didn't have this token at all.</paragraph>
+ </tablecell>
+ </tablerow>
</table>
<h2 id="hd_id591638374883162">Special case of CSV files with separator defined in the first line</h2>