https://bugs.documentfoundation.org/show_bug.cgi?id=127808
Regina Henschel <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #2 from Regina Henschel <[email protected]> --- I had a look at how Excel saves the "dynamic array" feature. Here are my (hopefully correct) results. They may be helpful for those who implement the feature. The xlsx-file has a global switch in metadata.xml to determine whether the "dynamic array" feature should be used at all. It is located in the <futureMetadata> element and there in the <xda:dynamicArrayProperties> chil delement, namely its ´fDynamic´ attribute. This <futureMetadata> element is linked to a <metadataType> element via the ´name´ attribute. This <metadataType> element contains the ´minSupportedVersion´ attribute, among others. For the "dynamic array" feature to be used at all in the document, fDynamic="1" must be set. A formula is contained as <f> element in the top left cell of its output area, also for CSE (Ctrl+Shift+Enter) formulas. If the formula is to create a "dynamic array", this cell has a ´cm´ attribute (18.3.1.4, Part 1, OOXML standard) that refers to the <futureMetadata> element. The ´cm´ attribute uses a zero-based index. In the example I examined, there was also a <cellMetadata> element, which is probably assigned the index value 0. In any case, ´cm="1"´ had to be set for the cell which contains the formula to have a "dynamic array" as output in my example. The fact that a "dynamic array" is generated is not limited to the new functions SORT, RANDARRAY, etc. For example, =ISBLANK(D12:F16) also generates a "dynamic array". In addition to the missing {} - which are used in the CSE case - you can recognize a "dynamic array" in the UI in Excel by the special frame that is shown around the array when a cell in the array is the active cell. When importing with SheetDataContext::importCell(), the ´cm´ attribute is ignored and the ´CellModel´ struct used for ´maCellData´ does not even have a component for it. I don't know whether the <futureMetadata> element is currently evaluated at all. BTW: If someone is going to implement this feature, please contact the ODF TC as early as possible. -- You are receiving this mail because: You are the assignee for the bug.
