GNOME Bugzilla – Bug 343176
[xls] INDEX problem
Last modified: 2018-05-22 13:16:06 UTC
Loading the attached XLS file gives the following messages: Reading file:///tmp/4.xls Excel 97 + Employees!L2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3A Employees!L2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3 Employees!M2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3A Employees!M2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3 Employees!N2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3A Employees!N2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3 Employees!O2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3A Employees!O2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3 Employees!P2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3A Employees!P2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3 Employees!Q2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3A Employees!Q2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3 Employees!R2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3A Employees!R2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3 Employees!AC2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3A Employees!AC2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3 Employees!AD2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3A Employees!AD2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3 Employees!AE2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3A Employees!AE2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3 Employees!AF2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3A Employees!AF2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3 Employees!AG2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3A Employees!AG2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3 Employees!AH2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3A Employees!AH2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3 Employees!AI2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3A Employees!AI2 : Hmm, ptgAttr of type 0 ?? I've seen a case where an instance of this with flag A and another with flag 3 bracket a 1x1 array formula. please send us this file. Flags = 0x3
Created attachment 66362 [details] DataValDealer.xls
No warnings on load, but the center table is computed incorrectly. All non-empty cells get 'Date', in XL they get 'Ann', 'Ben', 'Ed', etc. Formula example (Emplyees!L2): =if(row($A2:$A8)-row(A2)+1>count(T2:T8),"", index($A:$A,small(T2:T8,row(indirect("1:"&rows(A2:A8))))))
Another eval monstrosity hiding under the ptg=0 warning. I suppose it makes sense. The ptg=0 seemed to mark array functions in single cells. Now that we have most array iteration working these pieces stand out in sharp relief.
I've boiled down the test case a bit. The problem actually seems completely different than expected. Gnumeric defines SMALL/LARGE as =small(n1,n2,n3....k) whereas XL and OOo use =small(n,k) which allows for implicit iteration and intersection on 'k'. Patched for 1.7.12 and pile of new test cases added. Fixing INDEX will take a bit more time.
According to Comment #4 small and large are fixed. What is wrong with INDEX?
I would take a guess that the problem is that INDEX has definition gnumeric_index (GnmFuncEvalInfo *ei, int argc, GnmExprConstPtr const *argv) i.e., it gets expressions, not values. As such, it cannot work with implicit iteration. And INDEX' special handling of GNM_EXPR_OP_SET will probably make it hard to fix.
*** Bug 621350 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnumeric/issues/58.