> For the complete documentation index, see [llms.txt](https://boxlang.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boxlang.ortusbooks.com/boxlang-+-++/modules/bx-spreadsheet/built-in-functions/spreadsheetsetcellhyperlink.md).

# SpreadsheetSetCellHyperlink

Sets a hyperlink on a cell in a spreadsheet.

## Method Signature

```
SpreadsheetSetCellHyperlink(spreadsheetObj=[any], row=[any], column=[any], hyperlink=[any], label=[any])
```

### Arguments

| Argument         | Type      | Required | Description                                                                          | Default |
| ---------------- | --------- | -------- | ------------------------------------------------------------------------------------ | ------- |
| `spreadsheetObj` | `ANY`     | `true`   | The spreadsheet object.                                                              |         |
| `row`            | `NUMERIC` | `true`   | The row number (1-based).                                                            |         |
| `column`         | `NUMERIC` | `true`   | The column number (1-based).                                                         |         |
| `hyperlink`      | `STRING`  | `true`   | The hyperlink URL (e.g., "<http://example.com>", "mailto:<test@example.com>").       |         |
| `label`          | `STRING`  | `false`  | The optional display label for the hyperlink. If not provided, the URL is displayed. |         |

## Examples

Add a hyperlink to a cell:

```js
// Add URL to cell
var spreadsheet = SpreadsheetNew();
SpreadsheetSetCellValue( spreadsheet, 1, 1, "Visit Website" );
SpreadsheetSetCellHyperlink( spreadsheet, 1, 1, "https://example.com" );
```

Create resource links:

```js
// Add multiple links
var spreadsheet = SpreadsheetNew();
SpreadsheetSetCellValue( spreadsheet, 1, 1, "Google" );
SpreadsheetSetCellHyperlink( spreadsheet, 1, 1, "https://google.com" );

SpreadsheetSetCellValue( spreadsheet, 2, 1, "GitHub" );
SpreadsheetSetCellHyperlink( spreadsheet, 2, 1, "https://github.com" );
```

## Related

* [SpreadsheetGetCellHyperlink()](/boxlang-+-++/modules/bx-spreadsheet/built-in-functions/spreadsheetgetcellhyperlink.md) - Get hyperlink
* [SpreadsheetSetCellValue()](/boxlang-+-++/modules/bx-spreadsheet/built-in-functions/spreadsheetsetcellvalue.md) - Set cell value


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://boxlang.ortusbooks.com/boxlang-+-++/modules/bx-spreadsheet/built-in-functions/spreadsheetsetcellhyperlink.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
