Bug 127451 - return sheet name formula does not work
Summary: return sheet name formula does not work
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha1+
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-09 12:21 UTC by Elmar
Modified: 2020-05-15 03:59 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
saved in v6.0 (7.60 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-09-09 13:23 UTC, Elmar
Details
saved using v6.4 (12.50 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-09-09 13:24 UTC, Elmar
Details
language settings v6.0 (66.48 KB, image/png)
2019-09-09 13:26 UTC, Elmar
Details
language settings v6.4 (70.07 KB, image/png)
2019-09-09 13:27 UTC, Elmar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elmar 2019-09-09 12:21:17 UTC
Description:
=MID(CELL("Filename",A1),SEARCH("$",CELL("Filename",A1)0,1)+1,1)
returns sheet name in 6.0
but gets error #501 in v6.4

Steps to Reproduce:
1. type =MID(CELL("Filename",A1),SEARCH("$",CELL("Filename",A1)0,1)+1,1) in cell A1
2. 
3.

Actual Results:
returns Err:501

Expected Results:
should return Sheet1


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: en-GB
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: yes
Version: 6.4.0.0.alpha0+
Build ID: 27c886f5aa8e53b22caf0ef9d721f60e77cd65f2
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-09-06_05:15:30
Locale: en-ZA (en_ZA.UTF-8); UI-Language: en-GB
Calc: threaded
Comment 1 Elmar 2019-09-09 13:23:04 UTC
Created attachment 154053 [details]
saved in v6.0

if you open it in LO 6.0 the formula works
if you open it in LO 6.4 it interprets the , as a decimal point and thus fails
Comment 2 Elmar 2019-09-09 13:24:55 UTC
Created attachment 154054 [details]
saved using v6.4
Comment 3 Elmar 2019-09-09 13:26:05 UTC
Created attachment 154055 [details]
language settings v6.0
Comment 4 Elmar 2019-09-09 13:27:01 UTC
Created attachment 154056 [details]
language settings v6.4
Comment 5 Elmar 2019-09-09 13:42:50 UTC
My work-around: to change locale setting to English (UK).

However, if I pass this spreadsheet on to someone who has a different locale, then it may give error again.
the formula is :
=MID(CELL("Filename",A1),SEARCH("$",CELL("Filename",A1),1)+1,100)

You can see how +1,100 can be 1.1 in one locale and 1,100.0 in another.
Comment 6 Oliver Brinzing 2019-09-09 17:01:31 UTC
cannot confirm:

formula in attached file 6.0 (ok):
=MID(CELL("Filename";A1);SEARCH("$";CELL("Filename";A1);1)+1;100)

formula in attached file 6.4 (Err:501):
=MID(CELL("Filename",A1),SEARCH("$",CELL("Filename",A1)0,1)+1,1)

looks like a typo in 6.4

entering 
=MID(CELL("Filename";A1);SEARCH("$";CELL("Filename";A1);1)+1;100)

works for me with:

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 27c886f5aa8e53b22caf0ef9d721f60e77cd65f2
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded
Comment 7 Xisco Faulí 2019-10-16 12:02:33 UTC
=MID(CELL("Filename",A1),SEARCH("$",CELL("Filename",A1)0,1)+1,1)

also gives an error in

Version: 5.4.0.0.alpha1+
Build ID: 9feb7f7039a3b59974cbf266922177e961a52dd1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

however

=MID(CELL("Filename";A1);SEARCH("$";CELL("Filename";A1);1)+1;100)

works fine in master and 6.0

@Elmar, please recheck the formula...
Comment 8 QA Administrators 2020-04-14 03:27:01 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2020-05-15 03:46:55 UTC Comment hidden (obsolete)
Comment 10 Elmar 2020-05-15 03:59:34 UTC
I agree it is no longer an issue
Works correctly