Description: LibreOffice loses the sheet address when pasting into a text editor. Version: 24.2.0.3 (X86_64) / LibreOffice Community Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1 CPU threads: 4; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win Locale: pl-PL (pl_PL); UI: en-US Calc: threaded Steps to Reproduce: 1) Create Sheet2 2) Link cell A1 from Shee1 in Sheet2 (also A1) 3) View -> Show Formula (Ctrl+`) 4) Copy A1 from Sheet2 (text of formula: "=$Sheet1.A1") 5) Paste into text editor 6) Pasting result: "=$''.A1" Actual Results: =$''.A1 Expected Results: =$Sheet1.A1 Reproducible: Always User Profile Reset: No Additional Info: .
Created attachment 192749 [details] tdf#159871 between-sheet-formula.ods
Created attachment 192750 [details] tdf#159871 between-sheet-formula pasting (Ctrl+`).png
Reproducible with Version: 24.2.1.0.0+ (X86_64) / LibreOffice Community Build ID: cafcc50570f9edaaebe74d2152bae5df1cc2edfe CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win Locale: es-ES (es_ES); UI: en-US Calc: CL threaded Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: c68712d3689a0322e59934cd8151d003e869f30d CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win Locale: es-ES (es_ES); UI: en-US Calc: CL threaded Works better than in 7.6, where only copy the value. https://bugs.documentfoundation.org/show_bug.cgi?id=159338
In addition to the worksheet name in a formula, an item to also check is whether the path to another workbook is correctly pasted when copy-pasting formulas directly from the cell when Show Formulas is ON.
The formula =$Sheet2.A1 is actually =$#REF!.A1 so references are still valid when you rename Sheet2. It's not an implementation error but needs to be considered on copy. Meanwhile you can copy from the edit mode.
(In reply to Heiko Tietze from comment #5) > The formula =$Sheet2.A1 is actually =$#REF!.A1 so references are still valid > when you rename Sheet2. It's not an implementation error but needs to be > considered on copy. I'm confused. What STR are you using in order to get #REF? Who said anything about renaming any worksheet? > > Meanwhile you can copy from the edit mode. For 1 single cell, we can copy the formula from the input box of the formula bar. The point here is to be able to copy the content of multiple cells.
(In reply to ady from comment #6) > I'm confused. What STR are you using in order to get #REF? Paste as unformatted text or paste into a text editor, some input line... the actual content is a variable.
(In reply to Heiko Tietze from comment #7) > (In reply to ady from comment #6) > > I'm confused. What STR are you using in order to get #REF? > Paste as unformatted text or paste into a text editor, some input line... > the actual content is a variable. But that is not the original STR of this report. You are not supposed to copy the input line of some variable content. While showing formulas, you are supposed to copy the cell (which contains a formula pointing to a different worksheet), directly, no edit mode, no input box.
(In reply to ady from comment #8) > But that is not the original STR of this report. Yes, this report is about missing sheet names in formulas copied in 'View Formulas' mode and pasted for example into Notepad.exe, Notepad++ etc. (In reply to Heiko Tietze from comment #5) > The formula =$Sheet2.A1 is actually =$#REF!.A1 so references are still valid > when you rename Sheet2. Checking your consideration, I have noticed that after renaming the sheet, the formula works properly, but the text of this formula remains unchanged (as it was when the formula was created). So this is not an issue connected with ticket number 159871. Is this necessary to make another bug report about following sheet names in formulas?
(In reply to Piotr Osada from comment #9) > after renaming the sheet (...) the text of this formula remains unchanged In addition, even after saving as, and reopening the file, the formula still contains the inappropriate old sheet name.
(In reply to Piotr Osada from comment #10) > (In reply to Piotr Osada from comment #9) > > after renaming the sheet (...) the text of this formula remains unchanged > > In addition, even after saving as, and reopening the file, the formula still > contains the inappropriate old sheet name. This report is simple to reproduce. Worksheet renaming has nothing to do with this report (and I am not reproducing such behavior either). Moreover, the problem reported in this tdf#159871 can be replicated in LO 7.6 and older versions too; just use menu Tools > Options > LibreOffice Calc > View > Formulas, instead of using menu View > Show Formulas. Let's please keep the conversation on topic.
Sheet addresses are still skipped when copy-paste displayed formulas from cells. Open attachment 192750 [details] tdf#159871 – Pasting formulas (Ctrl+`) to notepad skips sheet address.ods 1) View -> Show Formula (Ctrl+`) 2) From 'Sheet2' copy cell A1 3) Paste into eg. Notepad.exe Actual result: =$''.A1 Expected result: =$Sheet1.A1 Reproduced in: Version: 24.2.4.2 (X86_64) / LibreOffice Community Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2 CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win Locale: pl-PL (pl_PL); UI: en-US Calc: threaded and Version: 24.8.0.0.beta1 (X86_64) / LibreOffice Community Build ID: 318462181c709ed29c01eb3239b4d600d7b82ecc CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win Locale: pl-PL (pl_PL); UI: en-US Calc: CL threaded
(In reply to Piotr Osada from comment #12) > Open attachment 192750 [details] Sorry: attachment 192749 [details]