How do you create a hyperlink to a folder in Calc?

asked 2019-11-18 18:45:13 +0100

Jerry-398498 gravatar image

updated 2019-11-22 12:11:50 +0100

In Excel, I found that I could create a hyperlink to a folder by selecting a file within the folder and then deleting the file name and just leaving the folder's path name. When I try that in Calc I get a the following message: "file:///Users/jerry/Documents/To%Do%Lists" is not an absolute URL that can be passed to an external application to open it.

I added the following on 11/19/2019:

I apologize for not stating my problem more clearly. First, I should mention that I am using mac OS and that is why I did not include a drive letter. My overall goal is to quit using Microsoft Office and convert everything to Libre Office. One of the things I have done in Excel for some time is to build To Do Lists in Excel. Often this takes the form of generating a documents that describes the problem in detail and then putting an entry in the to do list that has a hyperlink to the document. However, sometimes an item will be complicated enough that there are several documents associated with it. When that happens I put them in a separate directory.

Regarding comment 1: Yes I want the Finder, i.e. File Explorer, to open the specified directory when I click on the hyperlink so that I can review all of the documents associated with the task.

Regarding comment 2: mac OS doesn't use Drive letters like Windows does, that is why I didn't include one.

Regarding comment 3: I was attempting to limit the size of the question, so I only entered part of the URL. The Actual URL is file:///Users/jerry/Documents/To%20Do%20Lists/!%20!%20To%20Do%20Lists%20Attachments/, e.g. I do have a / at the end of the URL.

Regarding comment 4, this morning I tried using the HYPERLINK function: =HYPERLINK("file:///Users/jerry/Documents/To%20Do%20Lists/!%20!%20To%20Do%20Lists%20Attachments","To Do List Attachments"), but I get the same error messages I mentioned in the first paragraph.

Regarding comment 5: Yes you are correct, I did use the Hyperlink dialog, but since I am a real novice with Libre Office, I didn't understand the nuance about the blanks, so I have learned something valuable from you commend and I am grateful for that.

Finally I have a question. Should I have added these remarks as an edit to the original question, or should I have added them a Comment?

I thank you all for taking time to respond.

Added on 11/20/19

Regarding comment 6: Mike thanks for answering my question.

Regarding comment 7: I primarily use mac OS and I based this on my experience with Excel Version 16.29 running on mac OS Mojave Version 10.14.6 (18G1012).

On my Mac, I right-clicked on the folder, the held down the option key and selected ‘Copy "! ! To Do Lists Attachments” as Pathname’ from the pop-up menu ... (more)

edit retag flag offensive close merge delete


What do you want to achieve? File Explorer to open the specified directory, when clicking on the hyperlink in Calc?

Opaque gravatar imageOpaque ( 2019-11-18 18:49:53 +0100 )edit

Works for me with version (x64) - but I tested with absolute local path like file:///D:/Downloads/Path%20with%20spaces.

Your path doesn't look like a valid file: URI: I don't think it's a network share, rather a usual Windows' Users directory, but you forgot the drive part.

Mike Kaganski gravatar imageMike Kaganski ( 2019-11-18 19:00:58 +0100 )edit

Add a / at the end of the URL

PèreOrval gravatar imagePèreOrval ( 2019-11-18 19:21:01 +0100 )edit

Suggest to use function =HYPERLINK("C:\Users\jerry\Documents\To Do Lists";"To Do Lists") which cares about all the blanks etc. stuff.

Opaque gravatar imageOpaque ( 2019-11-18 19:26:27 +0100 )edit

The user likely uses the Hyperlink dialog (InsertHyperlink function), because of the mentioned "selecting a file within the folder and then deleting the file name and just leaving the folder's path name" sequence. That also takes care of all spaces automatically.

There's no need in adding trailing slash, the hyperlink should work just fine without.

Mike Kaganski gravatar imageMike Kaganski ( 2019-11-18 19:33:23 +0100 )edit

You did it correctly when edited your question to improve the question; thanks!

Mike Kaganski gravatar imageMike Kaganski ( 2019-11-19 14:44:10 +0100 )edit

So you want Finder being opened and that worked using Excel on macOS (or is your Excel-experience based on Windows - just to avoid the next trap)?

Opaque gravatar imageOpaque ( 2019-11-19 15:48:36 +0100 )edit

It works for me (on Linux) to enter just file:///home/username in a cell and a Ctrl+Click on the resulting field opens the file manager. Same with the HYPERLINK() function.

Apart from that your URI looks a tad odd file:///Users/jerry/Documents/To%20Do%20Lists/!%20!%20To%20Do%20Lists%20Attachments with the two exclamation marks and encoded spaces !%20!%20 in them. Is that really a folder name that you have on disk (note that an encoded %20 on disk is just a space)?

It may also be that you use a very old LibreOffice version (you didn't mention which).

erAck gravatar imageerAck ( 2019-11-19 18:10:09 +0100 )edit

Could reproduce on macOS (Mojave) and LibreOffice and directories URI. It just looks that it doesn't allow paths to files only on macOS (Using file URIs I got no problem). As already stated in other comments: No problem on Windows and no problem on Linux with URIs to directories.

Opaque gravatar imageOpaque ( 2019-11-20 19:38:30 +0100 )edit