[Libreoffice-bugs] [Bug 119509] FILEOPEN wrong column format in ODS but not XLSX
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Wed Aug 29 09:25:42 UTC 2018
https://bugs.documentfoundation.org/show_bug.cgi?id=119509
--- Comment #7 from Eike Rathke <erack at redhat.com> ---
What happens technically is that cells with a General format are formatted to
the result type. The result here *is* of type date, as a number is subtracted
from a date. If the result is to be forced to be displayed as number, then
either apply a fixed number format such as 0, or subtract a date (which in fact
that number should had represented, "43277 is the date 06/26/2018 converted to
a number") by using the DATE() function or a reference to a cell with content
of type date, in which case the result will be of type number.
The "if General format apply result format when loading .ods documents" was
introduced because earlier version never applied the result format but only
calculated it on the fly, which meant for a correct result display the entire
document had to be recalculated, which isn't wanted. Also, querying the cell
for the result format or type didn't work with the API and at other places
because no number format was applied.
Won't change this. The only thing sensible would be to remove the "recalculate
formula cells with General format when loading .ods" assuming that meanwhile
(in the last 5 years) old documents have been loaded and saved once with a
newer version. We'd then get bug reports from users who loaded an older
document and expected a formatted result but got General instead, which we'd
have to close as wontfix. Still, if such formula was re-entered the newly
resulting format is applied anyway.
You can't have both. Pick one.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180829/bae13523/attachment.html>
More information about the Libreoffice-bugs
mailing list