Terry wrote:
Rodney D. Myers wrote:
On Mon, 9 Oct 2006 22:19:13 +0100
CPHennessy <[EMAIL PROTECTED]> wrote:

On Sat October 7 2006 09:39, + Bob Treder wrote:
 [ MODERATED ] ********************
It looks like this is still broken in OO 2.0.3. I'm developing some
training materials in Impress and badly need relative paths to make passing
of materials work from wherever they are installed. Does anyone have a
suggestion on how to work around this? Everytime I create the link in
Impress, even with the two boxes checked that a mentioned in the messages
below the full path gets saved.
As you are not subscribed you may not have seen that:
On Sun October 8 2006 01:01, Terry wrote:
You could use the following methods published by an expert Spreadsheet
user on the forum:

[quote]
Some named refs from my default template. No macros,
platform-independant and they should work with Excel as well:
cFilename =CELL("FILENAME")
FilePath =RIGHT(FileURLPath;LEN(FileURLPath)-7)
FileURL =MID(cFilename;2;SEARCH("'#";cFilename)-2)
FileURLPath =MID(cFilename;2;SEARCH("/[^/]+'#";cFilename)-1)
shSep =MID(ADDRESS(1;1;1;"Foo");4;1)
ThisSheet =MID(cFilename;FIND("#$";cFilename)+2;256)

shSep returns "." in Calc and "!" in Excel (useful with indirect() or
pattern matching with/without regular expressions).
"FilePath" with Windows: =SUBSTITUTE(FilePath;"/";"\")
[end quote]
Please reply to [email protected] only.


Looked at those, and for the life of me, could not get them to do what
I want. DDE is so much simpler.
Greetings. Their usefulness in Impress depends on either embedding a spreadsheet in the presentation (I don't know whether you can do that) or using a spreadsheet as an index / master document.

The formulas are set out in a shorthand way which may not be easy to follow. There may be errors.

You have to enable the use of regular expressions in formulas: Tools >Options >Calc >Calculate.

After struggling somewhat myself (but making progress), I found two threads in the forum which contain the answers, with some effort to follow:

http://www.oooforum.org/forum/viewtopic.phtml?t=26620
http://www.oooforum.org/forum/viewtopic.phtml?t=37541

I was able to get this far before I really had to move on:

sFileName :
   =CELL("filename")  this is the starting point.

sFileUrlPath:
=MID(sFilename;2;SEARCH("/[^/]+'#";sFilename)-1) --> file:///home/terry/Data/WorkRef/Test/

sFilePath:
=RIGHT(sFileURLPath;LEN(sFileURLPath)-7) --> /home/terry/Data/WorkRef/Test/

winPath:
=SUBSTITUTE(RIGHT(sFilePath;LEN(sFilePath));"/";"\") --> \home\terry\Data\WorkRef\Test\

That gives you a local path that you can incorporate into a link. I did not have time to construct a link.

You may have to use the INDIRECT function.
I couldn't leave it there.  You do not need the INDIRECT function:

=DDE("soffice";sFilePath &"TestB.ods";"Sheet1.A1") --> 25 (The entry in the linked cell)

--

If you're seeking, check out http://www.rci.org.au

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to