Bug 88737 - XLSX: SQRT function on a range of values
Summary: XLSX: SQRT function on a range of values
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Spreadsheet (show other bugs)
Version: 4.3.5.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-23 09:32 UTC by raal
Modified: 2015-01-23 12:33 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
test files (43.70 KB, application/zip)
2015-01-23 09:32 UTC, raal
Details
test file with additions (5.87 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2015-01-23 10:27 UTC, Winfried Donkers
Details

Description raal 2015-01-23 09:32:10 UTC
Created attachment 112706 [details]
test files

Steps to reproduce:
- open xls and xlsx file

Actual results
result of C2:F2 is Error:522

Expected results
result of C2:F2 is 1,4142  1,7321 2,0000   2,2361

Printscreen from excel and LO in the test file.
Comment 1 Winfried Donkers 2015-01-23 10:27:05 UTC
Created attachment 112710 [details]
test file with additions

I don't know if this is a Calc-bug.
The OpenFormula definition of SQRT says that the argument is a number and so does the Excel function description.

In the attachments, the argument is not a number, but a range. Were the range B2:F2, it would have worked in Calc, but the range includes the cells where the results are stored. This is IMHO an incorrect function call.

If I enter in cell B8: "=SQRT(B2:F3)<Ctrl-Shift-Enter>", I get expected correct results in row 8 and expected error messages in row 9 (I would even expect an error in B9).

The results in B3:F3 are IMHO not right: the input is a 2-row array and the output should be a 2-row array as well.
Comment 2 Eike Rathke 2015-01-23 12:33:01 UTC
Winfried, in your document the range references are in normal formula mode and as such are evaluated as position dependent automatic intersections instead of array references. If you put the same formula in A12 you'd get an error because there is no intersection between the formula cell position and the range referenced.

Raal's documents contain array formulas, the Err:522 circular reference error we produce is certainly wrong, and I'm quite sure it worked some time ago.. 

This should not be related to the SQRT() function put probably any function that expects a scalar value parameter (e.g. ABS(), ...) when passed a range in array mode when imported from Excel documents exposes this behavior. I didn't check.


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.