hyperlink inside Exel to file on web server

New Here ,
Apr 13, 2021 Apr 13, 2021

Copy link to clipboard

Copied

I am trying to get the link inside my excel to open a file on my CF folder. The Excel file is in the same folder.

For the sake of explaining this is how the folders and files are structured:

I have 3 folders A, B, and C.

In folder A I have PDF_A1.pdf, PDF_A2.pdf and an excel file EXCEL_A.xlsx. The Excel file has 2 links to the 2 PDF files as described. Folder B and C are also similarly structured.

I use cfdirectory and navigating in and out of each folders and able to open the PDF files - no issue.

The problem is when I clicked to open the Excel file which opens fine, the link to the PDF points to my local temporary folder. But I wanted it to point the PDF file inside folder A

Thank you.

Views

51

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 14, 2021 Apr 14, 2021

Copy link to clipboard

Copied

When you say that you "clicked to open the excel file" I assume you mean you're downloading the excel file in your web browser.    When you do that a copy is pulled from the server and placed on your computer's temporary folder.    Since you're using relative paths, excel is correctly showing you that the link points to your temporary folder, because that's where the copy of the excel file has been downloaded to.

 

You'll need to use absolute paths instead.  If the excel file is at

http://www.mywebsite.com/folderA/EXCEL_A.xlsx

the link to the first PDF would be

http://www.mywebsite.com/folderA/PDF_A1.pdf 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 16, 2021 Apr 16, 2021

Copy link to clipboard

Copied

LATEST

ColdFusion uses the local temporary folder as a default. For example, when you supply just the file name, and no value for the folder. 

Use George's suggestion to create a link for users outside the server. For internal use, the full link will be something like file:///C:\ absolute\path\to\folderA\PDF_A1.pdf.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines