Bug 150782 - [FILEOPEN] NUMBERS filter misinterpreting DURATION function
Summary: [FILEOPEN] NUMBERS filter misinterpreting DURATION function
Status: NEW
Alias: None
Product: Document Liberation Project
Classification: Unclassified
Component: libetonyek (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Function Apple-iWork
  Show dependency treegraph
 
Reported: 2022-09-04 21:47 UTC by SheetJS
Modified: 2024-06-04 13:10 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Numbers BONDDURATION example (130.79 KB, application/zip)
2022-09-04 21:47 UTC, SheetJS
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SheetJS 2022-09-04 21:47:21 UTC
Description:
The `DURATION` function in Numbers takes 6 arguments and returns a time duration.  https://support.apple.com/guide/functions/duration-ffa561e8c4/12.1/web/1.0 documentation

The Excel/LibreOffice `DURATION` function is the Macaulay duration.  The Numbers equivalent is `BONDDURATION` (https://support.apple.com/guide/functions/bondduration-ffa5742353/12.1/web/1.0) and Numbers automatically translates between Excel's DURATION and the native BONDDURATION when reading and writing to Excel formats.

LibreOffice is currently retaining the original names.  `BONDDURATION` in the Numbers read codec should be translated to `DURATION` while `DURATION` should be mapped to something else.

Steps to Reproduce:
Download and open https://github.com/SheetJS/test_files/blob/master/duration_112/duration_112.numbers (uses Numbers DURATION) or attachment (uses Numbers BONDDURATION)

Actual Results:
duration_112: A series of Err:502 in the "Value" column and each function is translated to `DURATION` (preserving Numbers function name)

bondduration: The cell formula uses `bondduration`

Expected Results:
duration_112: DURATION should use something different

bondduration: BONDDURATION should be translated to DURATION


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Comment 1 SheetJS 2022-09-04 21:47:59 UTC
Created attachment 182216 [details]
Numbers BONDDURATION example
Comment 2 m_a_riosv 2022-09-04 23:36:53 UTC
I can't open the attached file with, it is unrecoverable for msexcel:
Microsoft® Excel® para Microsoft 365 MSO (versión 2207 compilación 16.0.15427.20182) de 64 bits

The behavior with LO 7.5 it's how described on the report.
Comment 3 SheetJS 2022-09-04 23:55:19 UTC
Both files are NUMBERS spreadsheets which can be opened with the Apple Numbers or iCloud Numbers ( https://icloud.com/numbers/ ).  The desktop app requires a Mac but iCloud Numbers is a web app.
Comment 4 Václav Kocian 2022-10-03 07:23:54 UTC
bondduration.numbers: After opening, B2 holds a value 5.02085. After Data-Calculate-Recalculate in changes to #NAME? as the bondduration is an unknown function

duration_112.numbers: Acts exactly as described in the original report.