Description: Spreadsheet formula =WEEKNUM(TODAY(),) is not imported correctly from xlsx. It is arguable whether empty 2nd parameter is valid, but we found formulas like this in the wild, and Excel does not have problems with it. Steps to Reproduce: 1. Open the attached bug document 2. Observe Err:502 in cell B1 Actual Results: Err:502 Expected Results: The week number of today. Reproducible: Always User Profile Reset: No Additional Info: .
Created attachment 198939 [details] minimal reproducer (xlsx)
https://gerrit.libreoffice.org/c/core/+/181048
Andras Timar committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/bfb8dbc4a6a462bc9a836d125faaeafd81daadd9 tdf#165011 accept empty second parameter of WEEKNUM spreadsheet function It will be available in 25.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Excel syntax is: WEEKNUM(serial_number,[return_type]) where return_type is optional with default value of 1 (week begins on Sunday, always from 01.01.). So this looks good to me. I checked with random weeknum calculations. Thanks.
Andras Timar committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/199f1c9da36470ce46b653f95a447e9d78d9605c tdf#165011 accept empty second parameter of WEEKNUM spreadsheet function It will be available in 24.8.6. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Andras Timar committed a patch related to this issue. It has been pushed to "libreoffice-25-2": https://git.libreoffice.org/core/commit/f533a8278e56a5c0c6d909f8227497774bcab1ed tdf#165011 accept empty second parameter of WEEKNUM spreadsheet function It will be available in 25.2.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Andras Timar committed a patch related to this issue. It has been pushed to "libreoffice-24-8-5": https://git.libreoffice.org/core/commit/ffa1dd40bd10d265c7bf8e25ba2e7ca24a061785 tdf#165011 accept empty second parameter of WEEKNUM spreadsheet function It will be available in 24.8.5. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.