On 12/12/2009 1:54 AM, Andreas Saeger wrote:
John Meyer wrote:
On 12/9/2009 10:25 AM, Johnny Rosenberg wrote:
2009/12/8 John Meyer<pueblonat...@opensuse.us>:

Have you tried =CELL(…)?


Doesn't have an infotype returning the sheet name.

My default template for Calc has 2 named references:
1. Insert>Names>Define...[Ctrl+F3]
cFilename    refers to: CELL("FILENAME")
[Add], [OK] (finsih the dialog since the next one depends on this one)

2. Insert>Names>Define...[Ctrl+F3]
ThisSheet refers to: MID(cFilename;FIND("#$";cFilename)+2;LEN(cFilename))
[Add], [OK]

Now ThisSheet used in a formula refers to the current sheet's name.

Together with ThisSheet you may also define things like:
FileURL    =MID(cFilename;2;SEARCH("'#";cFilename)-2)
FileURLPath    =MID(cFilename;2;SEARCH("/[^/]+'#";cFilename)-1)
shSep    =MID(ADDRESS(1;1;1;1;"Foo");4;1) ["!" in Excel, "." in Calc]



Thanks.  I may have to tinker with it, though since I'll be doing links.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@openoffice.org
For additional commands, e-mail: users-h...@openoffice.org

Reply via email to