Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Internal link in numbers to a pdf file

Hi


I want to add links to text I type inside cells that will refer to pdf files I have stored inside my hard drive.


Is this possible ?


if yes how can I do it ?


Thanks in advance.

iMac, OS X Mavericks (10.9.2)

Posted on Apr 7, 2014 5:45 AM

Reply
7 replies

Apr 7, 2014 6:42 AM in response to chris_gmu

Chris,


No, Numbers can't reference a document or file of any type on your system, for any purpose. Applescript and Automator can, I believe, but that's not in my expertise. The question for someone who could write a script for you would be what so you plan to do with the document you refer to.


Numbers can link you to a document stored on the internet if it has a URL, such as a document stored in the cloud on on DropBox, etc.


Jerry

Apr 8, 2014 9:10 AM in response to chris_gmu

Chris,


This is not a hyperlink. But it is a way to directly reference files from Numbers. You put the file's path in the cell. Then, unlike a hyperlink where you click the cell to open the file, you click once on the cell, hit a keyboard shortcut, and the file opens.


First you need to install this Open File Automator Service (Dropbox download). Just double-click (and if necessary click "Download Anyway" in System Preferences > Privacy & Security).


Then assign a keyboard shortcut at System Preferences > Keyboard > Shortcuts.


User uploaded file



Your Numbers Services menu will now look something like this:


User uploaded file


After this one-time, two-minute set-up, now all you have to do is select a Numbers cell containing a file's path and hit option-shift-command-l (or whatever keyboard shortcut you have chosen) and the Numbers document (or other file) pops open.


To get a proper file path to paste into a Numbers cell, you can use a script like this (just paste into AppleScript Editor to run, or you can install it in your menu as an Automator Service):


set f to choose file with prompt "Choose a file" --of type {"pdf"}

set myPath to POSIX path of f as text

set the clipboard tomyPath



Again, not quite as easy as entering a hyperlink. But not hard to use. Just run the script, select a file when prompted, click a cell in Numbers, and command-v to paste. The path format will be as shown in the screenshot (ie., with the / rather than the : that you sometimes see).


SG

Dec 21, 2014 5:06 PM in response to chris_gmu

I have been searching for an answer to this everywhere and for ages. Then I stumbled across this reply on another site.

It works for me, I merely want to review a scanned invoice pdf from within a Numbers spreadsheet.

Save the scan to a file location. Open Finder, go to that file, drag it to Safari, it will open. Copy the safari URL and paste into the Numbers cell. Right click on the cell and select Open URL and it opens the doc in Safari. Really useful.


"I have found a work around to put links to PDF or other files into a Pages or Numbers document, although it adds a few more steps:


Type the FILE URL into a Pages/Numbers document, highlight it, and choose Pages > Services > Open URL

(or Shift - Command - A)


This will open the PDF document.


To find the FILE URL, you can open almost any document using Safari, or simply drag the file from your desktop into a Safari browser window, and it will tell you the URL in the address bar (it looks something like file:///Users/... and yes there are three slashes ///).


This is a very convenient way to reference PDF files (or many other files) without actually pasting them into your Pages document and making the file size huge.


I really hope Apple adds an easier way to link to PDFs in iWork. It would make things SO much easier. Nowadays things are much more interactive than before. My documents are no longer static text, but dynamic brainstorming sessions with media, links, and Apple scripts."

Dec 22, 2014 2:04 AM in response to Badunit

I'm using the latest version of Numbers with Yosemite. In my haste to share my discovery it seems I forgot to mention that I may have typed .pdf at the end of the URL address. Try doing that. It's certainly working for me. In fact it's opening the file in Preview now too. When I get back to the Mac I'll do it again unless you confirm it works in the meantime.

Dec 22, 2014 6:29 AM in response to a_cat002

Because you said it works, I tried it a few more times with several different files. Some work but most that I tried do not. I cannot tell what the difference is between the ones that do and don't work. In one case I have two files with the exact same path name and with similar filenames (in that they are alphanumeric, no spaces, no special characters, etc.). One opens in Preview while the other says "The Open URL Service Cannot Be Used".


The path names already have .pdf at the end. I tried adding an additional .pdf but it didn't work. I tried the script to get the path name (instead of using Safari) but that didn't make any difference. I am stumped.

Dec 23, 2014 8:29 AM in response to Badunit

And low and behold, now that you've said that, all my links have stopped working!! I get the same URL message you mention and another saying that it just won't work. How annoying! Frustrating as anything.


I've tried putting the files into the Apache local web server as suggested elsewhere and that doesn't work either! I don't know what to suggest now.


I genuinely thought we'd found a fix.


How on earth does one get Apple to listen I wonder?

Internal link in numbers to a pdf file

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.