Bug 155435 - Duplicating sheet containing COUNTIF references to ranges in external files damages formula
Summary: Duplicating sheet containing COUNTIF references to ranges in external files d...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.4.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-22 11:08 UTC by brodders
Modified: 2023-12-20 03:13 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brodders 2023-05-22 11:08:28 UTC
Copy of complex sheet A from source spreadsheet, which contains datapoints, to a new spreadsheet using Paste-All succeeds. Call this new sheet A'

In the new spreadsheet, clicking on the new pasted sheet A' nametag offers an option to duplicate the sheet. The duplicated sheet fails to refer to the source spreadsheet data correctly, making calculations fail.

The issue seems to be data ranges not being duplicated correctly, with unnecessary 'file:' references which confuses a range statement.

Copying works using: enter sheet A', select top-left All cell and Ctrl-C. Create new sheet. Select cell A1 and Paste-All.

No corruption occurrs and the source data is accessed correctly.

Example of the good A' cell formula content, which correctly accesses the remote data in 'long filename':

=COUNTIFS('file:///C:/NEngDRoot/_Threepwood/Proj-01 BESS/Tranche_2_May_23/BESS Analysis 202305 Tranch2-v1.ods'#$'BESS Data'.AZ8:AZ17527,">="&E10,'file:///C:/NEngDRoot/_Threepwood/Proj-01 BESS/Tranche_2_May_23/BESS Analysis 202305 Tranch2-v1.ods'#$'BESS Data'.AZ8:AZ17527,"<"&F10)

"Duplicate sheet" tab option mangles this formula as follows:

=COUNTIFS('file:///C:/NEngDRoot/_Threepwood/Proj-01 BESS/Tranche_2_May_23/BESS Analysis 202305 Tranch2-v1.ods'#$'BESS Data'.AZ8:'file:///C:/NEngDRoot/_Threepwood/Proj-01 BESS/Tranche_2_May_23/BESS Analysis 202305 Tranch2-v1.ods'#$BESS1.AZ17527,">="&E10,'file:///C:/NEngDRoot/_Threepwood/Proj-01 BESS/Tranche_2_May_23/BESS Analysis 202305 Tranch2-v1.ods'#$'BESS Data'.AZ8:'file:///C:/NEngDRoot/_Threepwood/Proj-01 BESS/Tranche_2_May_23/BESS Analysis 202305 Tranch2-v1.ods'#$BESS1.AZ17527,"<"&F10)

The duplicate is much longer and instead of using the good datarange:

'long filename'#$'BESS Data'.AZ8:AZ17527

we now have the failing:

'long filename'#$'BESS Data'.AZ8:'long filename'#$BESS1.AZ17527

Where did the "BESS1" come from??


The data in here is confidential and consists of numerous columns of 17,520 deep datapoints; files are large.
Comment 1 Xisco Faulí 2023-05-22 11:29:25 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 2 ady 2023-05-22 14:05:38 UTC
Bug 153790 might be related.

I would suggest testing with a current dev master build 

https://wiki.documentfoundation.org/Testing_Daily_Builds
Comment 3 QA Administrators 2023-11-19 03:12:43 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2023-12-20 03:13:02 UTC
Dear brodders,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp