Bug 126250 - make function returning values or reference capable of returning values or reference
Summary: make function returning values or reference capable of returning values or re...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.1.6.3 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-06 09:03 UTC by freta
Modified: 2019-11-23 10:02 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
an example (7.93 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-11-18 07:13 UTC, freta
Details
Calc function potential arguments (31.37 KB, image/jpeg)
2019-11-21 15:05 UTC, LibreOfficiant
Details

Note You need to log in before you can comment on or make changes to this bug.
Description freta 2019-07-06 09:03:55 UTC
A1=33

I think that all function capable to return a value (33) corresponding to a reference (A1) should be capable to directly return the reference (A1).
I think that all function capable to return a reference (A1) corresponding to a value (33) should be capable to directly return the associated value (33).

note : functions are in french
There is plenty of function and some times we are interested by the value, other times by the reference. I think there is no reason that EQUIV cannot return value or RECHERCHEV cannot return reference. It make things complicated, and Calc is ever very complicated. (I'm not able to compare with Excel.)


I propose to add or change the syntax by :
- to get a value : always write « FUNCTION »
I think this is the more common case.

- to get a reference : always write « &FUNCTION »


I know that this should broke plenty of files. But I recently beginning writing a little bit complicated Calc, and it is a pain. The problem of reference is not the one : there is a lot of things that are hard to do or understand. And I am a programmer! Retrospectively, I think, because I am the only user of my Calc file, that it should be simpler to rewrite it on SQL with views and procedures.
And my file is not so complicated. I think the tool make things difficult.
I am sorry to write this: I know that the actual Calc have needed a huge work.
Comment 1 LibreOfficiant 2019-11-15 16:35:56 UTC
Hi freta


Any function you're in, you can get the reference you expect from CurrentSelection Object. As you exhibit a french email address I recommend you have a look at Calc examples in the wiki at:
https://wiki.documentfoundation.org/Macros/Calc/fr
They should provide you the insight you look for.

Function names are locale-driven, switch to english you'll get english function names.

To sum up, I feel that your requirement is already covered.

In the advent I may have misunderstood your issue, please be nice to provide example or evidence file.
Comment 2 freta 2019-11-18 07:13:31 UTC
Created attachment 155906 [details]
an example
Comment 3 freta 2019-11-18 07:22:44 UTC
I linked a file where I find a value for getting the right line index. RECHERCHEV can give me the value to the column at right, not the index. So I do not see simple ways to retrieve one time the index/cell, and then make operations based on it.

As you write, it seems my requirement is covered by macro. But I think it could be covered without macro. 

Thank you.
Comment 4 LibreOfficiant 2019-11-21 15:05:46 UTC
Created attachment 156002 [details]
Calc function potential arguments

Keep in mind that bugs are being handled by volunteers. To get a chance to raise developers' interest your enhancement request should be as consistent and convincing as possible.

The use case backing up your enhancement should detail the expected gain when being provided with selected cells references, next to computing benefits. Note that multiple cell ranges can be arguments of the FUNCTIONs, as well as hard values as per attached image.

Your detailed requirement should consider all possibles scenarii.
Regards