Bug 60385 - Formulae which subtract remote references to sheets with a space in the name return an error 509
Summary: Formulae which subtract remote references to sheets with a space in the name ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.2.2 release
Hardware: x86 (IA32) Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Reference
  Show dependency treegraph
 
Reported: 2013-02-07 00:00 UTC by John Russell
Modified: 2023-04-09 15:52 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Worksheet demonstrating error (11.44 KB, application/ods)
2017-10-10 04:37 UTC, John Russell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Russell 2013-02-07 00:00:20 UTC
I'm running LibreOffice Spreadsheet 3.6.2.2 in Ubuntu 12.10. The minus operator used with references to cells in other sheets which have spaces in their names more than once in a formula usually generates a 509 error. 

For example: 
 =-'1 2 3'!r[-7]c-'1 2 3'!R[-7]C
 =-'1 2'!r[-8]c-'1 2'!R[-8]C
 =-'s 1'!r[-9]c-'S 1'!R[-9]C
 =-'sheet 2'!r[-10]c-'Sheet 2'!R[-10]C
 =-'sheet 2'!r1c1-'Sheet 2'!R1C1
all generate Err:509 rather than the expected result. 
whereas:
 =-Sheet8!R[-12]C-Sheet8!R[-12]C
generates the expected result.

A single minus operator and reference to the other sheet works as expected, and I notice that if I add the second minus operator and reference, the name of the first sheet reference changes to lower-case. 

If I put a space in the name of a sheet used in a working formula with the minus operator, it continues to work, whether or not I re-enter it. If I enter the same formula in a new cell, it returns an error.

I'm using R1C1 references, and both absolute and remote references are affected. 

It is possible to work round the problem by placing the cell references in brackets and applying the minus sign outside the brackets, for example:
 =-('sheet 2'!r1c1+'Sheet 2'!R1C1)
generates the expected result.
Comment 1 Joel Madero 2013-05-29 20:14:35 UTC
Please attach a document where we see the behavior.

Marking as NEEDINFO - once you attach document mark as UNCONFIRMED and we will take a look at it. Also, just out of curiosity, how do you know this is bad result? Did it used to behave differently or behaves differently in another office suite? I don't know much about R1C1 so I'm curious :)


Thanks!
Comment 2 QA Administrators 2013-12-22 21:58:24 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2014-02-02 02:00:37 UTC Comment hidden (obsolete)
Comment 4 John Russell 2017-10-10 04:37:41 UTC
Created attachment 136880 [details]
Worksheet demonstrating error

Formulae which subtract remote references to sheets with a space in the name return an error 509

Happens with all styles of reference: Calc A1, Excel A1, Excel RC
Comment 5 John Russell 2017-10-10 04:42:26 UTC
LibreOffice Version: 5.3.1.2
Build ID: 1:5.3.1-0ubuntu2
Ubuntu 17.04 on a MacBook Retina Pro

@Joel Maduro It's a bad result in any spreadsheet when a reference returns an error instead of the value of the referenced cell.
Comment 6 Buovjaga 2017-11-04 18:04:29 UTC
(In reply to John Russell from comment #4)
> Created attachment 136880 [details]
> Worksheet demonstrating error
> 
> Formulae which subtract remote references to sheets with a space in the name
> return an error 509
> 
> Happens with all styles of reference: Calc A1, Excel A1, Excel RC

Confirmed with file.

Lowering severity due to the existence of a workaround.

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha1+
Build ID: 64024d7c18bd114eb9958cf80eea9129e09923bd
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on November 3rd 2017
Comment 7 QA Administrators 2018-11-05 03:43:17 UTC Comment hidden (obsolete)
Comment 8 John Russell 2019-06-05 13:38:14 UTC
Confirmed the problem persists.

Version: 6.2.4.2.0+
Build ID: libreoffice-6.2.4.2-snap1
CPU threads: 8; OS: Linux 4.18; UI render: default; VCL: gtk3; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-US
Calc: threaded
Comment 9 John Russell 2019-06-05 13:41:17 UTC
Notwithstanding the existence of a workaround, this error generates errors in spreadsheets imported from packages which don't share the same misbehaviour, e.g. Excel. 

And it's confusing when a formula which should normally work doesn't.
Comment 10 QA Administrators 2021-06-05 04:26:55 UTC
Dear John Russell,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug