There is HYPERLINK function in Calc, that is documented [1] [2] to take URL/IRI. There's also ENCODEURL [3] to properly URL-encode various strings. Yet, the latter function is not enough to convert random system filepath into proper file: URL on all platforms. E.g., on Windows, the conversion also includes replacing backslashes '\' with forward-slashes '/'. A naive attempt to concatenate "file://" with "c:\path to\file.ext" would result in invalid URL; also concatenating "file://" with ENCODEURL("c:\path to\file.ext") is not correct. But in fact, LibreOffice does the magic of proper conversion of system filepaths into URLs: clicking on a cell with > =HYPERLINK("c:\path to\file.ext") would result in attempt to open proper "file:///c:/path%20to/file.ext". The magic happens in ScGlobal::OpenURL calling ScGlobal::GetAbsDocName. I suppose it's worth mentioning that on HYPERLINK help page, to avoid users trying to create file URLs in various wrong ways. Refs: https://ask.libreoffice.org/en/question/255719/, https://ask.libreoffice.org/en/question/142052/ [1] https://help.libreoffice.org/6.4/en-US/text/scalc/01/04060109.html?DbPAR=CALC#bm_id9959410 [2] docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#__RefHeading__1018226_715980110 [3] https://help.libreoffice.org/6.4/en-US/text/scalc/01/func_webservice.html?DbPAR=CALC#bm_id811517136840444
Pierre F committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/b457ef1b8cf5a62891e5aa747a2ebd3959c2f206 HYPERLINK tip. tdf#134896