GNOME Bugzilla – Bug 158691
duplicate sheet keeps reference to the original sheet
Last modified: 2018-05-22 13:08:29 UTC
Open the sample test file. Duplicate the sheet. In the new sheet, cell A3 contains Sheet1!A1. I think gnumeric should update references to the original sheet and make them point to the new sheet. Cell A3 should contain Sheet1(2)!A1. FWIW, that's what XL does, and that would be useful to have this behaviour in gnumeric too, at least as an option.
Created attachment 33931 [details] sample file
Your proposal would remove the difference between Sheet1!A1 and A1 on Sheet1. Currently we can use Sheet1!A1 if we want to make sure that Sheet1 is referenced and we can use A1 if we just mean 'this sheet, whatever it is.' If we follow your suggestions we remove a useful difference without gaining anything!
Good point. My main concern is about graphs. They allways refer explicitely to a sheet, even if it's its parent.
I think we need a third option. Just leaving the sheet unspecified doesn't solve things for a few reasons - XL sets the sheet explicitly, so all files imported from xls won't work as expected. - XL requires that the sheet be set when it imports, so anyone using xls as the primary format still has problems. - It makes it more difficult for us to truely support full sheet charts. After a bit of thinking it seems like the problem is that we can not differentiate between a case of copying an object from one sheet to another, and a case of duplicating the entire sheet and it's objects. In latter situation XL handles explicit references to the local sheet differently, and changes them to refer to the new sheet.
Even if "XL handles explicit references to the local sheet differently, and changes them to refer to the new sheet", We should have a way to refer to a sheet in a fixed way. I may want to duplicate a sheet to make some changes to my analysis. This should not force me to keep my data on a separate sheet (which can cause problems when laying out the sheet for printing and I want to include my small data-set). To ensure that my duplicate sheet uses the same data I should be able to explicitly link to a sheet and retain that reference even it it is the current sheet. (Now if we had a `this' sheet reference, the argument would be different.) I think that XL import and export should handle compatibility issues. That should not force weird behaviour for people that don't use and never use XL. It is quite annoying to have to tell people: that's done that way because XL is doing it that way.
I agree that behavior should not be defined based on Excel, though importing excel files should be able to work. I just encountered this problem again, ver 1.6.3 of Gnumeric, I right-clicked on a sheet tab, picked the "duplicate" option, and the graph that was embedded in Sheet1 still referred to Sheet1 data on the new Sheet1(2). This is very confusing behavior!!
It looks like it's fixed in gnumeric SVN.
*** Bug 513091 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnumeric/issues/32.