Ask Your Question
0

Copy/Paste From One File to Another

asked 2020-06-13 09:12:30 +0200

bart_s gravatar image

updated 2020-06-13 16:22:51 +0200

I found this post without answer.

https://ask.libreoffice.org/en/question/149725/copypaste-from-one-sheet-to-another/?comment=250056#post-id-250056

I am facing exactly the same problem (I think) and I have made it reproducible. Because I do not have an answer, and I think this is indeed an issue, I am creating a new question for it.

Similar to the poster in the link I have financial worksheets, one file per year, one sheet per month Jan, Feb, ... Nov, Dec. Besides those tabs I have a Config sheet. All month sheets refer to the Config sheet for some general settings (thresholds for conditional formats, lookup tables for items with fixed price per year etc.)

The month sheets are setup to be universal. They look at the sheet name to know what month it is. Therefore I must reference data to the Config sheet with the dollar signs like this $Config.$A$1

Now if I copy+paste that reference with dollar signs between the month sheets in one file, everything is fine. When I copy+past those cells to another file, the $Config.$A$1 will become an external link to the original file and becomes something like 'file:///C:/SomDir/SecondFile.ods'#$Config.$A$1 . Removing the leading $ sign is not an option because then the sheet reference will change when you copy+paste between tabs. Copy+Paste Special is no option because you can choose for formula's and will get the external link or not paste formula's and you will get values only.

This can easily be tested and reproduced.

Is there any way where I can tick that I do not want external links to be generated when copy+paste between two files ?

edit
I have used OpenOffice before until recently. There are some conditional formats that reference to $Config.$A$2$ as well. In Libreoffice it works, but I cannot find the rules itself anymore in the conditional formatting dialogs

edit2
Now that I found the conditional formatting, I see that the $Config.$A$1 reference is as it should be, without external link. Makes the question even more legit: Why in cell formula's an external link is created while to the same reference in the conditional format it is not ?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-06-13 11:06:48 +0200

erAck gravatar image

Is there any way where I can tick that I do not want external links to be generated when copy+paste between two files

No, but you can select the Config sheet as well and copy it along together with the other sheet(s).

conditional formatting, I see that the $Config.$A$1 reference is as it should be, without external link

Sounds like a bug to me.

Why in cell formula's an external link is created

Because if not then you'd get an invalid reference. Cell references with sheet reference refer a sheet position, not a sheet name.

edit flag offensive delete link more

Comments

File 1 and file 2 both have the Month sheets and the Config sheet (sorry if that was not clear from the question). Then I make some nice new functionality in file 1 and want to copy it to file 2. So there is no invalid reference. I also do not copy the entire sheets, only the content or some of the content.

Now also tested in openoffice calc, and there no external link is created. I started checkin on Libreoffice because of the nasty "bad allocation" problems in openoffice, but if my links getting external, then I am not sure which one of the two will cost more work.

bart_s gravatar imagebart_s ( 2020-06-13 11:25:39 +0200 )edit

You can use Find&Replace (Ctrl+H) to change the external references to the target document's Config sheet, e.g.

  • Find: 'file:///home/user/Documents/sourcefilename.ods'#
  • Replace: (empty)

Hit ReplaceAll button.

erAck gravatar imageerAck ( 2020-06-15 17:28:13 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-06-13 09:12:30 +0200

Seen: 62 times

Last updated: Jun 13