Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LibreOffice Calc: How to get file path of the current ods document into the cell?

I would like to get current document folder path as a cell value. I need it for proper relative reference creation used in a function call OFFSET(INDIRECT(<generated filepath#sheet.cell>))

I am out of luck with google. I found basic function ThisComponent.getURL() that could help.

The nearest solution is via the reference to other file in the same folder with use of function FORMULA() over that cell an then using string operations over the result.

I would expect some simple function like INFO() but I could not find any.

Thanx

like image 988
urkon Avatar asked Dec 02 '16 15:12

urkon


People also ask

Which tool is used to arrange the contents of cell within that cell itself in LibreOffice Calc?

Sorting within Calc arranges the cells in a sheet using the sort criteria that you specify.


1 Answers

Add this

=CELL("filename")

to your cell. It's an absolute path, but you could further manipulate it with the standard text functions.

Documentation reference

like image 198
artfulrobot Avatar answered Oct 05 '22 00:10

artfulrobot