Whatever message this page gives is out now! Go check it out!

spreadsheetGetHyperlinks

Last update:
May 18, 2026

Description

Retrieves all hyperlinks, in a spreadsheet, created using the spreadsheetSetCellHyperlink function.

Returns

An array of structs containing the address, column, row, and type of all the hyperlinks.

History

  • ColdFusion (2025 release): Added the function.

Syntax

spreadsheetGetHyperlinks(spreadsheetObject)

Parameters

Name
Required
Type
Description
spreadSheetObject
Yes
ExcelInfo
The Excel spreadsheet object from which to retrieve the hyperlinks.

Example

<cfquery name="art" datasource="cfartgallery">
    SELECT * FROM ART
</cfquery>
<cfscript>
    theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "art-hyperlinks.xls";
    // create a spreadsheet object
    theSheet=spreadsheetNew("SampleData")
    // add rows from query
    spreadsheetAddRows(theSheet,art)
    // add three hyperlinks
    // hyperlink struct
    hStruct1={
        row:3,
        column:3,
        address: "https://www.adobe.com",
        type:"URL"
    }
    // set hyperlink on cell 3,3
    spreadsheetSetCellHyperlink(theSheet,hStruct1)
    // second hyperlink
    hStruct2={
        row:4,
        column:3,
        address: "https://www.google.com",
        type:"URL"
    }
    // set hyperlink on cell 4,3
    spreadsheetSetCellHyperlink(theSheet,hStruct2)
    // third hyperlink
    hStruct3={
        row:5,
        column:3,
        address: "https://www.apple.com",
        type:"URL"
    }
    // set hyperlink on cell 5,3
    spreadsheetSetCellHyperlink(theSheet,hStruct3)
    // write the spreadsheet
    spreadsheetWrite(theSheet,theFile,"yes")
    // get all the hyperlinks
    listOfHyperlinks=spreadsheetGetHyperlinks(theSheet)
    writeDump(listOfHyperlinks)
</cfscript>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page