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

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 and then pasted the result following this line.

/Users/jerry/Documents/To Do Lists/! ! To Do Lists Attachments

The reason for the exclamation points is to make this folder appear near the top of the contents of the enclosing folder when they are sorted by name.

The reason for the spaces is that my eyesight is not that good and adding spaces makes it easier for me to read.

I considered the comment about the complexity of the file name I was using quit interesting, so next I created this folder:

/Users/jerry/Documents/Lists/Attachments

and tried using both the Hyperlink dialog and the Hyperlink command to access it. Both of these failed in the same manner my previous attempts with the bulkier file name failed.

I copied the following text from the menu that was displayed when I selected “Libre Office” → “About Libre Office”

Version: 6.2.6.2
Build ID: 684e730861356e74889dfe6dbddd3562aae2e6ad
CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx;
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

Added on 11/22/19

Regarding comment 9

@mention Opaque

Can you point me to some documentation that explains the difference between paths to Directories and URLs to Directories.

Many thanks,

Jerry

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

Works for me with version 6.3.3.2 (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.

Add a / at the end of the URL

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

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.

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

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)?

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).

Could reproduce on macOS (Mojave) and LibreOffice 6.3.3.2 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.