This appears to be bug fdo#47223 however a possible workaround (using file:../filename
notation) is provided. Note, that I cannot get the notation mentioned in the bug to work as described, but have had some success with file:./filename
notation, which would seem more correct in any case.
I have done some rudimentary testing (TDF LO v4.0.2.2) using the DDE
function, Edit > Paste Special… > Link / DDE Link (which I presume the question is referring to), and inserting OLE objects. The Save URLs relative to file system option that @mariosv mentions does not always appear to prevent a relative URL being transformed into an absolute one. All examples below are performed with the Save URLs relative to file system option checked.
Paste ODT text into ODS cell
Edit > Paste Special… > DDE Link menu / dialog. This is the default link created when pasting a heading from an ODT into a cell of an ODS (heading is displayed as expected):
=DDE("soffice","/home/oweng/temp/LO_test/text.odt","__DdeLink__60_870516294")
An edited version of the pasted link (heading is displayed as expected):
=DDE("soffice","file:./text.odt","__DdeLink__60_870516294")
An edited version of the pasted link (results in #N/A
):
=DDE("soffice","./text.odt","__DdeLink__60_870516294")
An edited version of the pasted link (results in #N/A
):
=DDE("soffice","text.odt","__DdeLink__60_870516294")
The behaviour above is the same if linking (using this method) from one spreadsheet to another e.g., to a single cell value.
Paste separate ODS file (cell) into another ODS file (cell)
Edit > Paste Special… > Options > Link menu and dialog. Admittedly this is not making use of the DDE function. This is the default link created when pasting a cell from one ODS into a cell of another ODS (cell value from the source sheet is displayed as expected):
='file:///home/oweng/temp/LO_test/values.ods'#$Sheet1.B2
This is the displayed link after being edited to ='file:./values.ods'#$Sheet1.B2
(naturally, cell value remains unchanged):
='file:///home/oweng/temp/LO_test/values.ods'#$Sheet1.B2
This is the displayed link after being edited to ='./values.ods'#$Sheet1.B2
(naturally, cell value remains unchanged):
='file:///home/oweng/temp/LO_test/values.ods'#$Sheet1.B2
This is the displayed link after being edited to ='values.ods'#$Sheet1.B2
(naturally, cell value remains unchanged):
='file:///home/oweng/temp/LO_test/values.ods'#$Sheet1.B2
It is not possible to paste text content (e.g., from an ODT) via the Edit > Paste Special… > Options > Link method.