Bug 139832 - function vpr doesn't show results if i use round brackets
Summary: function vpr doesn't show results if i use round brackets
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-22 11:29 UTC by Nikita
Modified: 2021-01-22 12:19 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
vpr bag (22.25 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-01-22 11:30 UTC, Nikita
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita 2021-01-22 11:29:52 UTC
Description:
Hello!
I have a document in format ODF. When i use vpr with round brackets then i get as results '#Н/Д', without round backets if i delete them everything ok. The problem could be solve by two ways: 1) save file to xls, 2) delete round brackets, so the bug only appears with ods. I did it reproduce in libreoffice 6.4 and 7.0

Actual Results:
'#Н/Д'

Expected Results:
vpr value


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.0.4.2
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 2; OS: Linux 4.19; UI render: default; VCL: kf5
Locale: ru-RU (ru_RU.UTF-8); ИП: ru-RU
Calc: threaded
Comment 1 Nikita 2021-01-22 11:30:54 UTC
Created attachment 169087 [details]
vpr bag
Comment 2 Mike Kaganski 2021-01-22 11:59:12 UTC
This is not a bug.
In your ODS document, you have regular expressions enabled in formulas [1]. As VLOOKUP documentation tells [2]:

> The search supports wildcards or regular expressions.
> ...
> You can switch the automatic evaluation of wildcards or regular expression
> on and off in Tools - Options - LibreOffice Calc - Calculate.

Brackets have special meaning in regular expressions [3]. So with regular expressions enabled, search for string "Детские продукты (Акушерство)" actually tries to find text "Детские продукты Акушерство", and would make "Акушерство" a referenceable entity (not what you obviously expect).

Excel (and its formats) do not support regular expressions, thus saving in its formats would disable regular expressions in its files. But with ODS, which supports all modes fully, if you don't need regular expressions, you need to make proper settings.

Note that in later versions of LibreOffice, regular expressions are not enabled by default, partially to avoid newbies making this mistake.

Closing NOTABUG.

[1] https://help.libreoffice.org/7.1/en-US/text/shared/optionen/01060500.html#bm_id3154419
[2] https://help.libreoffice.org/7.1/en-US/text/scalc/01/04060109.html?DbPAR=CALC#bm_id3153152
[3] https://help.libreoffice.org/7.1/en-US/text/shared/01/02100001.html
Comment 3 Nikita 2021-01-22 12:19:31 UTC
Thanks a lot!