Hi,
I want to display part of the spreadsheet filename in a calc cell, and expected to find a function or "insert field" command to access the filename, but cannot find anything which does this. Does anyone know how to access the filename?
Cheers, Nick.
[Solved] Access Filename in Calc
[Solved] Access Filename in Calc
Last edited by nickdrums on Mon Aug 03, 2009 2:22 pm, edited 1 time in total.
OOo 3.2.0 on Ms Windows Vista
Re: Access Filename in Calc
The print header or footer is the "natural" place for this.
CELL("filename") returns the complete system independent URL including the sheet name: 'file:///path/document.ods'#$SheetX
=MID(CELL("filename");2;FIND("'#";CELL("filename"))-2) returns the URL alone.
CELL("filename") returns the complete system independent URL including the sheet name: 'file:///path/document.ods'#$SheetX
=MID(CELL("filename");2;FIND("'#";CELL("filename"))-2) returns the URL alone.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: [Solved] Access Filename in Calc
May I ask for additional help. I just want to display the name of the file without the path (for example "birthdays.ods").
Would you know how to do this?
Bob
Would you know how to do this?
Bob
Apache OpenOffice 4.1.3 on Windows 10
Re: [Solved] Access Filename in Calc
By cell functions and regular expressions:
viewtopic.php?f=9&t=65936
viewtopic.php?t=79375&p=364778
by macro (usage of the text functions of the Tools library):
viewtopic.php?f=45&t=10728
viewtopic.php?f=9&t=65936
viewtopic.php?t=79375&p=364778
by macro (usage of the text functions of the Tools library):
viewtopic.php?f=45&t=10728
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.