Bug 50077 - FORMATTING: String to Number conversion does not work
Summary: FORMATTING: String to Number conversion does not work
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version: Master old -3.6
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-17 20:42 UTC by Lu
Modified: 2015-01-04 11:20 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Sample Document (21.24 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-05-17 23:22 UTC, Rainer Bielefeld Retired
Details
Illustration Graph with and without formulae (23.73 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-05-19 23:53 UTC, Lu
Details

Description Lu 2012-05-17 20:42:09 UTC
e.g. cell contains =mid(b4,7,2), displays 25, the chart doesn't read the cell as a number [in spite of formatting].

I can supply an example.
Comment 1 Rainer Bielefeld Retired 2012-05-17 23:18:40 UTC
I wonder for what that operation might be useful, but [Reproducible] with parallel installation of Master "LOdev 3.6.0alpha0+  – WIN7 Home Premium (64bit) ENGLISH UI [Build ID: 7175cee]" (tinderbox: Win-x86@6-fast, pull time 2012-05-16 22:07:37)

In attached sample you see 2 strings looking like numbers in B5 and B7 what are missing in chart, although for any calculation they are accepted as numbers. I can't see any sense in this behavior.
Comment 2 Rainer Bielefeld Retired 2012-05-17 23:22:50 UTC
Created attachment 61783 [details]
Sample Document
Comment 3 Rainer Bielefeld Retired 2012-05-17 23:24:13 UTC
I also see the described behavior with LibO 3.3.3 and OOo 3.2, the behavior seems inherited from OOo

@Kohei:
Please set Status to ASSIGNED and add yourself to "Assigned To" if you accept this Bug
Comment 4 Lu 2012-05-19 23:53:11 UTC
Created attachment 61875 [details]
Illustration Graph with and without formulae

Attached spreadsheet illustrating problem - note that although number format selected, cells displays as text default
Comment 5 A (Andy) 2015-01-04 11:20:53 UTC
Reproducible with LO 4.4.0.0.beta1 and 4.3.4.1 (Win 8.1).

But the MID function is a text function (https://help.libreoffice.org/Calc/Text_Functions).
It extracts a text string out of a text and therefore the result is a text (LO Help: "Returns a text string of a text.": https://help.libreoffice.org/Calc/Text_Functions#MID).

Therefore, I would mark it not as a bug.

I thought about where there could maybe be a need to extract a number out of a larger number or text and I could there maybe think of a Personal ID Code or other generated codes where you need to extract a number.
In this respect it is interesting to see, that LO can already calculate with the text string result and if you add a number calculates a correct sum/number.
Therefore, I would mark it is an enhancement request that either the MID function can also return a number as one further feature or implement a further similiar function that returns a number.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.