spreadsheetSetCellHyperlink

Adds a hyperlink to a cell in the active sheet of a spreadsheet workbook. Rows and columns are 1-based. When the cell is empty its visible text defaults to the link itself; pass a value with setCellValue first to control the display text. An optional tooltip is shown on hover in the spreadsheet application. The fluent member form is setCellHyperlink(link, row, column, tooltip).

spreadsheetSetCellHyperlink(spreadsheetObj, link, row, column [, tooltip]) → returns any

This function requires RustCFML.  Not supported on Lucee, Adobe ColdFusion, etc.

Argument Reference

spreadsheetObj any
Required

The spreadsheet workbook object.

row numeric
Required

1-based row index of the cell.

column numeric
Required

1-based column index of the cell.

tooltip string

Optional tooltip text shown on hover.

Compatibility

RustCFML:

Not supported on wasm32.

Examples
Sample code invoking the spreadsheetSetCellHyperlink function

Link B2 to example.com with a tooltip.

wb = Spreadsheet("xlsx");
spreadsheetSetCellValue(wb, "Home", 2, 2);
spreadsheetSetCellHyperlink(wb, "https://example.com", 2, 2, "Open link");

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub