Bug 55071 - Array Formulas Do Not Work
Summary: Array Formulas Do Not Work
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Spreadsheet (show other bugs)
Version: 3.6.1.2 release
Hardware: Other All
: medium major
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-18 19:50 UTC by llatl
Modified: 2014-03-14 12:15 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Single sheet workbook with example of failed array formulas. (77.50 KB, application/vnd.ms-excel)
2012-09-18 19:50 UTC, llatl
Details

Description llatl 2012-09-18 19:50:53 UTC
Created attachment 67353 [details]
Single sheet workbook with example of failed array formulas.

I have an Excel 97-2003 workbook that relies on many array formulas. In Calc 3.3, the formulas worked as expected when I opened the workbook in Calc. In versions 3.5 thru 3.6.2, the formulas do not work.

I have attached a single sheet of the original workbook so that you can see a sample of the problems I'm having. Column J is where the formulas are located. I don't know if my use of the Offset function to dynamically name ranges is part of the problem or not. Still, remember that all my formulas work correctly in Cal 3.3.


Leb
Comment 1 GerardF 2012-09-19 10:11:38 UTC
Since 3.6.0 there is a change with INDIRECT function syntax.

You can no longer use formula like =ROW(INDIRECT("1:"&ROWS(range)))
but you may write complete adresses =ROW(INDIRECT("A1:A"&ROWS(range)))

unles you change the option in :
Tools > Options > LO Calc > Formula > Detail calculation setting
Custom : "Excel A1" instead of "use formula syntax".

I set it to NEW (not WORKSFORME) because i don't know why this change and if this change is really usefull.
Comment 2 jimg 2012-10-18 03:37:02 UTC
another example:

was reviewing an "[excel challenge][1]" and found an question that I can obtain an answer with excel 2003+ but not in LibreOffice Calc 3.5.4.2. I'm interested in why the solution doesn't work in Calc but does in Excel. For question 6:

    =STDEV('Raw Data'!C2:C252/MID('Raw Data'!A2:A252,10,4))

And yes, I understand that it is a CSE formula and entered in the formula with ctrl+shift+enter in both excel and calc. Excel returns a result, Calc returns #DIV/0!.

Saving / reloading the file in xls or ODS has no effect in Calc - and Calc is configured for cells to auto calculate (Tools > Cell Contents > AutoCalculate on) so that isn't the culprit. Also tried (Tools > Options > LO Calc > Formula = ExcelA1) and edited (add space then remove space) & saved (shift-ctrl-enter) without any change.

Any ideas why?

  [1]: http://cl.ly/1g1N0a2b0b0P0M182d07
Comment 3 GerardF 2012-10-18 14:20:10 UTC
Freedesktop is for reporting bug, not for question. Use mailing list for tis.

MID function returns "text" value, use VALUE to convert text in number.

STDV(dara1/VALUE(MID(data2,10,4)))
Comment 4 jimg 2012-10-18 15:54:07 UTC
@GerardF - Thank you for isolating the problem. My point is that excels default is to treat the extracted array elements as numeric, while Calc interprets them as text. Whether Excel or LO Calc is the faulty one is left for individual interpretation, but Excel types will get caught up here.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.