Re: [libreoffice-users] Insert the filename in a cell

2012-10-20 Thread Rolf Lochbühler
The following two Basic macros FILENAME() and FILEPATH() may help. ~ Option Explicit Option VBASupport 1 ' Enables InStrRev() ' Returns file name including extension. Public Function FILENAME() As String Dim u As String Dim i As Long u = ConvertFromURL( ThisComponent.Url ) i = InSt

Re: [libreoffice-users] Insert the filename in a cell

2012-10-20 Thread Tom Davies
19 October 2012, 15:23 >Subject: Re: [libreoffice-users] Insert the filename in a cell > >I solved it with this formula: > >=REPLACE(REPLACE(CELL("filename");FIND(".";CELL("filename");1);(LEN(CELL("filename"))-FIND(".";CELL("fi

Re: [libreoffice-users] Insert the filename in a cell

2012-10-19 Thread Samuele Zampini
I solved it with this formula: =REPLACE(REPLACE(CELL("filename");FIND(".";CELL("filename");1);(LEN(CELL("filename"))-FIND(".";CELL("filename");1)+1);"");1;SEARCH("/[^/]*$"; CELL("filename"));"") I like it! On Fri, Oct 19, 2012 at 4:06 PM, Jay Lozier wrote: > On 10/19/2012 08:41 AM, Samuele Zam

Re: [libreoffice-users] Insert the filename in a cell

2012-10-19 Thread Jay Lozier
On 10/19/2012 08:41 AM, Samuele Zampini wrote: Dear All, I am trying to insert in a cell (let's say A1) the file name (without the path and - if possible - without the extension). I have tried this

[libreoffice-users] Insert the filename in a cell

2012-10-19 Thread Samuele Zampini
Dear All, I am trying to insert in a cell (let's say A1) the file name (without the path and - if possible - without the extension). I have tried this, but it does not work: Err.501 app