https://bugs.documentfoundation.org/show_bug.cgi?id=173468

            Bug ID: 173468
           Summary: Text import for Calc has no good way to import
                    fractions
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Description:
Currently, when importing values into Calc using the text import wizard, the
only way to correctly import fractional values is to explicitly set the format
of the destination cells to 'Fraction' before opening the import dialog, *and*
select 'Detect special numbers' during the import.

If you do not do this, the fractions will be imported as text - unless 'Detect
special numbers' is selected and a value happens to have a numerator between 1
and 31 and a denominator between 1 and 12, or vice-versa, in which case it is
instead assumed to be a date. You cannot even apply the format afterwards; if
you try, a leading single quote is automatically added to the value, preventing
it from being converted. Nor can values which were parsed as dates be converted
back to the original value; the current year is added automatically to the
(assumed) month and day.

The import dialog already has the ability to specify the type of a column, such
as marking it as always being text or being a date in a specified format. What
it lacks is the option for a 'Fraction' type, which would both enable parsing
fraction values in that column (irrespective of 'Detect special numbers') and
sets the formatting type of the resulting cells to 'Fraction'. 

Other useful column types:
- 'Percent': All decimal values are assumed to represent precents, irrespective
of whether they have a percent sign after them. Fractional values are also
accepted, and are converted to the corresponding percentage. The formatting
type is set to 'Percent'. (So e.g. '10%' -> '10%', '1' -> '1%', '0.01' ->
'0.01%', '1/2' -> '50%'.)
- 'Number': Accepts anything that you could type into a cell manually and would
be parsed as a number, so decimals, fractions, percentages, scientific
notation, etc.. Date values are never assumed. The formatting type of each cell
is set based on the type of value it was parsed from.

Steps to Reproduce:
N/A

Actual Results:
N/A

Expected Results:
N/A


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 26.2.5.2 (X86_64)
Build ID: cd7284b4cbbfeb507e630c1aac019f4157393acb
CPU threads: 8; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Raster;
VCL: win
Locale: en-CA (en_CA); UI: en-US
Calc: CL threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to