Bug 166806 - When copying a group of selected sheets, references between them change
Summary: When copying a group of selected sheets, references between them change
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-31 14:16 UTC by Vladimir Sokolinskiy
Modified: 2025-05-31 22:50 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 Vladimir Sokolinskiy 2025-05-31 14:16:30 UTC
Calc users often select a group of related sheets and copy these sheets to another document.
In this case, in each copied sheet, the reference to the cell range of another sheet in the formulas is replaced with a reference to the cell range of the sheet of the source workbook.

Excel behaves differently.
If a formula on the copied sheet (A) contains a reference to a cell range of another sheet (B), then it is replaced with a reference to the cell range of the sheet of the source workbook only if the other sheet (B) is not subject to copying (not selected).

The same logic in Calc and Excel is applied in the case when the copied sheet contains a hyperlink to other sheets.

In my opinion, Excel's behavior meets user expectations, but Calc's behavior does not.

Suggestion: in the "Move/Copy Sheet" dialog, provide a parameter that will regulate the preservation of mutual references (hyperlinks) between the copied sheets.

The same for the corresponding ".uno:move" command.

In tdf#130180 it is suggested to replace absolute references to sheets with relative ones. But we should not change the Calc document from which the sheets are copied. In addition, for example, if the formula on the first sheet contains a relative reference to the third sheet (the name of the third sheet is specified without the "$" prefix) and we copy only the first and third sheets, then the reference after copying will contain an error value.
Comment 1 m_a_riosv 2025-05-31 22:50:28 UTC
Please attach a sample file, reduce the size as much as possible without private information,
and paste the information in Menu/Help/About LibreOffice, there is a copy icon.