https://bugs.documentfoundation.org/show_bug.cgi?id=155435

            Bug ID: 155435
           Summary: Duplicating sheet containing COUNTIF references to
                    ranges in external files damages formula
           Product: LibreOffice
           Version: 7.4.6.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: srbrodd...@yahoo.co.uk

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to