Bug 149578 - FILESAVE: WORKDAY function saved incorrectly in XLSX format
Summary: FILESAVE: WORKDAY function saved incorrectly in XLSX format
Status: CLOSED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-15 14:45 UTC by Erich E. Hoover
Modified: 2022-06-16 10:03 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erich E. Hoover 2022-06-15 14:45:04 UTC
Description:
When opening a spreadsheet in Excel that has been saved by LibreOffice in XLSX format the WORKDAY function instead shows up as:
com.sun.star.sheet.addin.Analysis.getWorkday

Steps to Reproduce:
1. create a cell containing a date ( for example, A1: =TODAY() )
2. create a cell containing a number of dates ( for example, B1: 1 )
3. create a cell containing the workday function that uses those cells ( C1: =WORKDAY(A1,B1) )
4. save the document in XLSX format
5. open the document in MS Excel or Google Sheets

Actual Results:
C1: =com.sun.star.sheet.addin.Analysis.getWorkday(A1,B1)

Expected Results:
C1: =WORKDAY(A1,B1)


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Version: 7.3.2.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 12; OS: Linux 5.16; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.3-0ubuntu0.22.04.1
Calc: threaded
Comment 1 Eike Rathke 2022-06-15 15:59:55 UTC
Can't reproduce.
This is what gets saved to the document's xl/worksheets/sheet1.xml stream:

    <row r="1" customFormat="false" ht="12.8" hidden="false" customHeight="false" outlineLevel="0" collapsed="false">
      <c r="A1" s="1" t="n">
        <f aca="true">TODAY()</f>
        <v>44727</v>
      </c>
      <c r="B1" s="0" t="n">
        <v>1</v>
      </c>
      <c r="C1" s="0" t="n">
        <f aca="false">WORKDAY(A1,B1)</f>
        <v>44728</v>
      </c>
    </row>

Do you have any settings in effect that could affect the representation of function names?

Note also the versions you gave do not match:
Version: 7.3.2.2 / LibreOffice Community
Ubuntu package version: 1:7.3.3-0ubuntu0.22.04.1
i.e. 7.3.2 vs 7.3.3
Comment 2 Erich E. Hoover 2022-06-15 17:12:43 UTC
(In reply to Eike Rathke from comment #1)
> Can't reproduce.
> This is what gets saved to the document's xl/worksheets/sheet1.xml stream:
> ...

Oh, that's nifty - I got (before reinstalling):
===
    <row r="1" customFormat="false" ht="12.8" hidden="false" customHeight="false" outlineLevel="0" collapsed="false">
      <c r="A1" s="1" t="n">
        <f aca="true">TODAY()</f>
        <v>44727</v>
      </c>
      <c r="B1" s="0" t="n">
        <v>1</v>
      </c>
      <c r="C1" s="1" t="n">
        <f aca="false">com.sun.star.sheet.addin.Analysis.getWorkday(A1,B1)</f>
        <v>44728</v>
      </c>
    </row>
===

> Do you have any settings in effect that could affect the representation of
> function names?

I don't believe so, I generally leave all the LibreOffice settings at their defaults except for where toolbars go.

> Note also the versions you gave do not match:
> Version: 7.3.2.2 / LibreOffice Community
> Ubuntu package version: 1:7.3.3-0ubuntu0.22.04.1
> i.e. 7.3.2 vs 7.3.3

I copied the version info from the program and did not edit it.  At one point I did have the libreoffice-dev package installed to test the fix for another bug, but I removed that when the fix was released.  I just uninstalled LibreOffice and reinstalled it and now I'm seeing:
===
Version: 7.3.3.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 12; OS: Linux 5.16; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.3-0ubuntu0.22.04.1
Calc: threaded
===
and the WORKDAY function is now represented correctly in the output file.  I'm not even sure how that mismatch is possible, but how I reinstalled was:
$ sudo apt remove libreoffice*
$ sudo apt install libreoffice

Should I open some other form of bug for this?
Comment 3 Eike Rathke 2022-06-16 10:03:56 UTC
No (or not here but maybe Ubuntu). We have the two "See also" bugs for similar function name oddness, and if in your case Ubuntu has some unclean upgrade path with their packages (it's not the first time I see something broken/mismatching with their distribution's (PPA?) installation and remove and install cured that) it's nothing LibreOffice could fix. Version 7.3.3.2 and package version 7.3.3 is perfectly fine, packages don't have the RC number added to their name. But version 7.3.2.2 and package version 7.3.3 was broken.