You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Document-Processing/Excel/Spreadsheet/Blazor/hyperlink.md
+38-38Lines changed: 38 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,32 @@
1
1
---
2
2
layout: post
3
-
title: Hyperlink in the Blazor Spreadsheet component | Syncfusion
4
-
description: Checkout and learn how to insert, edit, and remove hyperlink in the Syncfusion Blazor Spreadsheet componentand more.
3
+
title: Hyperlinks in the Blazor Spreadsheet component | Syncfusion
4
+
description: Learn how to insert, edit, remove, and manage hyperlinks in the Syncfusion Blazor Spreadsheet component,programmatic methods, and events.
5
5
platform: document-processing
6
6
control: Spreadsheet
7
7
documentation: ug
8
8
---
9
9
10
-
# Hyperlink in Blazor Spreadsheet component
10
+
# Hyperlinks in the Blazor Spreadsheet component
11
11
12
-
Hyperlink in the Blazor Spreadsheet enable interactive navigation both within and outside of spreadsheets. This feature creates clickable link that connect to external web URLs, specific cells within the current worksheet, or cells in other worksheets. To control this functionality, use the [AllowHyperlink](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AllowHyperlink) property, which enables or disables hyperlink support in the Spreadsheet. The default value of the `AllowHyperlink` property is **true**.
12
+
Hyperlinks in the Blazor Spreadsheet enable interactive navigation both within and outside of spreadsheets. This feature creates clickable links that connect to external web URLs, specific cells within the current worksheet, or cells in other worksheets. To control this functionality, use the [AllowHyperlink](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AllowHyperlink) property, which enables or disables hyperlink support in the Spreadsheet. The default value of the `AllowHyperlink` property is **true**.
13
13
14
14
The keyboard shortcut `Ctrl + K` can be used to quickly open the **Insert** or **Edit** hyperlink dialog for the active cell, without using the UI elements. This shortcut works regardless of whether the hyperlink functionality is accessed through the Ribbon or the Context Menu.
15
15
16
16
N> When `AllowHyperlink` is set to **false**, the hyperlink options are removed from the interface (Ribbon and Context Menu), although existing hyperlinks will still function. Additionally, shortcut keys (**Ctrl + K**) and API methods related to this feature will no longer work.
17
17
18
-
## Insert hyperlink
18
+
## Insert Hyperlink
19
19
20
-
Hyperlink can be added to worksheet cells to create interactive elements that improve navigation and connect data to external sources. These links can point to:
21
-
***Web URLs** - Direct access to websites, such as https://www.syncfusion.com
22
-
***Cell References** - Quick jumps to specific cells within the same sheet, like **A1** or a range such as **B5:C10**
23
-
***Sheet References** - Navigation to cells in other sheets, for example, **Sheet2!A1**
20
+
Hyperlinks can be added to worksheet cells to create interactive elements that improve navigation and connect data to external sources. These links can point to:
21
+
***Web URLs** - Direct access to websites, such as `https://www.syncfusion.com`.
22
+
***Cell References** - Quick jumps to specific cells within the same sheet, like `A1` or a range such as `B5:C10`.
23
+
***Sheet References** - Navigation to cells in other sheets, for example, `Sheet2!A1`.
24
24
25
25
The linked cells are typically formatted with underlined and colored text to indicate they are clickable.
26
26
27
-
### Insert hyperlink via UI
27
+
### Insert Hyperlink via UI
28
28
29
-
Hyperlink can be inserted through the user interface (UI) using any of the following methods:
29
+
Hyperlinks can be inserted through the user interface (UI) using any of the following methods:
30
30
31
31
**Using the Ribbon**
32
32
@@ -47,9 +47,9 @@ Hyperlink can be inserted through the user interface (UI) using any of the follo
47
47
48
48

49
49
50
-
### Insert hyperlink programmatically
50
+
### Insert Hyperlink Programmatically
51
51
52
-
Hyperlink can be added programmatically using the [AddHyperlinkAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AddHyperlinkAsync_System_String_System_String_System_String_) method. This method allows hyperlink to be added to cell or range of cells without using the UI. The available parameters in the `AddHyperlinkAsync` method are:
52
+
Hyperlinks can be added programmatically using the [AddHyperlinkAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AddHyperlinkAsync_System_String_System_String_System_String_) method. This method allows hyperlinks to be added to a cell or range of cells without using the UI. The available parameters in the `AddHyperlinkAsync` method are:
Hyperlink in a spreadsheet can be edited to update the destination or the display text. This includes:
124
+
Hyperlinks in a spreadsheet can be edited to update the destination or the display text. This includes:
125
125
126
126
-**Changing the Web URL** - Update the hyperlink to point to a different website or online resource.
127
127
-**Editing the Display Text** - Modify the text in the cell without affecting the link destination.
128
-
-**Updating Cell References** - Modify the hyperlink to point to a different cell in the same sheet (e.g., from A1 to B5).
129
-
-**Linking to Another Sheet** - Redirect the hyperlink to a different sheet by modifying the sheet name in the reference (e.g., from Sheet1!A1 to Sheet2!C3).
128
+
-**Updating Cell References** - Modify the hyperlink to point to a different cell in the same sheet (e.g., from `A1` to `B5`).
129
+
-**Linking to Another Sheet** - Redirect the hyperlink to a different sheet by modifying the sheet name in the reference (e.g., from `Sheet1!A1` to `Sheet2!C3`).
130
130
131
-
### Edit hyperlink via UI
131
+
### Edit Hyperlink via UI
132
132
133
-
Hyperlink can be edited through the user interface (UI) using any of the following methods:
133
+
Hyperlinks can be edited through the user interface (UI) using any of the following methods:
134
134
135
135
**Using the Ribbon**
136
136
@@ -151,27 +151,27 @@ Hyperlink can be edited through the user interface (UI) using any of the followi
151
151
152
152

153
153
154
-
> When editing hyperlink to other sheets, ensure that the target sheet exists in the workbook. Link to non-existent sheets result in errors when clicked.
154
+
> When editing hyperlinks to other sheets, ensure that the target sheet exists in the workbook. Links to non-existent sheets result in errors when clicked.
155
155
156
-
## Remove hyperlink
156
+
## Remove Hyperlink
157
157
158
-
Removing a hyperlink disconnects the cells from their associated destinations while retaining the display text. This operation eliminates only the hyperlink functionality without altering the actual content of the cells. Any cells that do not contain a hyperlink are ignored during the process, and no errors are generated.
158
+
Removing a hyperlink disconnects the cell from its associated destination while retaining the display text. This operation eliminates only the hyperlink functionality without altering the actual content of the cell. Any cells that do not contain a hyperlink are ignored during the process, and no errors are generated.
159
159
160
-
### Remove hyperlink via UI
160
+
### Remove Hyperlink via UI
161
161
162
162
To remove a hyperlink using the interface, select the cell that contains the hyperlink, then right-click to open the context menu. From the available options, choose **Remove Hyperlink** to delete the link from the selected cell.
163
163
164
-
When dealing with multiple hyperlinks, selecting a range of cells - such as A1 to D5 - allows all hyperlinks within that range to be removed in a single operation. This method is efficient for cleaning up large sets of hyperlinks quickly.
164
+
When dealing with multiple hyperlinks, selecting a range of cells-such as `A1` to `D5`-allows all hyperlinks within that range to be removed in a single operation. This method is efficient for cleaning up large sets of hyperlinks quickly.
165
165
166
166

167
167
168
-
### Remove hyperlink programmatically
168
+
### Remove Hyperlink Programmatically
169
169
170
-
Hyperlink can be removed programmatically by using the [RemoveHyperlinkAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_RemoveHyperlinkAsync_System_String_) method. This method eliminates hyperlink functionality from the specified cell or range of cells within a spreadsheet, allowing for efficient bulk removal through code. The available parameters in the `RemoveHyperlinkAsync` method are:
170
+
Hyperlinks can be removed programmatically by using the [RemoveHyperlinkAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_RemoveHyperlinkAsync_System_String_) method. This method eliminates hyperlink functionality from the specified cell or range of cells within a spreadsheet, allowing for efficient bulk removal through code. The available parameters in the `RemoveHyperlinkAsync` method are:
171
171
172
172
| Parameter | Type | Description |
173
173
| -- | -- | -- |
174
-
| cellAddress | string | Specifies the cell or range of cells from which hyperlink should be removed. |
174
+
| cellAddress | string | Specifies the cell or range of cells from which hyperlinks should be removed. |
The Blazor Spreadsheet provides events that are triggered during hyperlink operations, such as [HyperlinkCreating](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkCreatingEventArgs.html), [HyperlinkCreated](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkCreatedEventArgs.html), and [HyperlinkClick](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkClickEventArgs.html). These events enable the execution of custom actions before and after hyperlink is created or interacted with, allowing for validation, customization, and response handling.
228
+
The Blazor Spreadsheet provides events that are triggered during hyperlink operations, such as [HyperlinkCreating](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkCreatingEventArgs.html), [HyperlinkCreated](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkCreatedEventArgs.html), and [HyperlinkClick](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkClickEventArgs.html). These events enable the execution of custom actions before and after a hyperlink is created or interacted with, allowing for validation, customization, and response handling.
229
229
230
230
***HyperlinkCreating** - The `HyperlinkCreating` event is triggered prior to the creation of a hyperlink. It offers an opportunity to modify or validate the hyperlink details before the link is added to the sheet, enabling custom logic or restrictions to be applied during the hyperlink creation process.
231
231
@@ -235,11 +235,11 @@ The Blazor Spreadsheet provides events that are triggered during hyperlink opera
235
235
236
236
### HyperlinkCreating
237
237
238
-
The `HyperlinkCreating` event is triggered before a hyperlink is added to cell. This event provides an opportunity to inspect, modify, or cancel the hyperlink creation process based on custom logic or validation requirements.
238
+
The `HyperlinkCreating` event is triggered before a hyperlink is added to a cell. This event provides an opportunity to inspect, modify, or cancel the hyperlink creation process based on custom logic or validation requirements.
239
239
240
240
**Purpose**
241
241
242
-
This event is useful for scenarios where hyperlink behavior needs to be controlled dynamically - such as restricting certain URLs, customizing display text, or preventing hyperlinks in specific cells.
242
+
This event is useful for scenarios where hyperlink behavior needs to be controlled dynamically, such as restricting certain URLs, customizing display text, or preventing hyperlinks in specific cells.
243
243
244
244
**Event Arguments**
245
245
@@ -248,7 +248,7 @@ The event uses the [HyperlinkCreatingEventArgs](https://help.syncfusion.com/cr/b
248
248
| Event Arguments | Description |
249
249
|----------------|-------------|
250
250
| Uri | Represents the hyperlink destination, which can be a web URL or an internal sheet reference in the format **"SheetName!CellReference"**. This value can be modified to redirect the hyperlink to a different location. |
251
-
| CellAddress | Specifies the cell location where the hyperlink will be inserted. The address must be specified using A1 notation (e.g., "A1", "B5"). |
251
+
| CellAddress | Specifies the cell location where the hyperlink will be inserted. The address must be specified using A1 notation (e.g., `A1`, `B5`). |
252
252
| DisplayText | Defines the visible text shown in the cell for the hyperlink. This can be customized to provide a user-friendly label, distinct from the actual hyperlink destination. |
253
253
| Cancel | Indicates whether the hyperlink creation should be aborted. Setting this property to **true** prevents the hyperlink from being added, allowing for conditional validation or restriction logic. |
254
254
@@ -301,16 +301,16 @@ The `HyperlinkCreated` event is triggered after a hyperlink has been successfull
301
301
302
302
**Purpose**
303
303
304
-
This event is useful for scenarios where actions need to be taken after a hyperlink is created - such as confirming the link, updating related metadata, or notifying users of the change.
304
+
This event is useful for scenarios where actions need to be taken after a hyperlink is created, such as confirming the link, updating related metadata, or notifying users of the change.
305
305
306
306
**Event Arguments**
307
307
308
308
The [HyperlinkCreatedEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkCreatedEventArgs.html) includes the following properties:
309
309
310
310
| Event Arguments | Description |
311
311
|----------------|-------------|
312
-
| Uri | Represents the hyperlink destination, which can be either an external web URL (e.g., "https://example.com") or an internal sheet references. This value is read-only and reflects the final destination of the hyperlink. |
313
-
| CellAddress | Specifies the cell location where the hyperlink has been inserted. The address is provided in A1 notation (e.g., **"A1"**, **"B5"**), and indicates the exact position of the hyperlink in the worksheet. This value is read-only. |
312
+
| Uri | Represents the hyperlink destination, which can be either an external web URL (e.g., `https://example.com`) or an internal sheet reference. This value is read-only and reflects the final destination of the hyperlink. |
313
+
| CellAddress | Specifies the cell location where the hyperlink has been inserted. The address is provided in A1 notation (e.g., `A1`, `B5`), and indicates the exact position of the hyperlink in the worksheet. This value is read-only. |
314
314
| DisplayText | Defines the visible text shown in the cell for the hyperlink. This user-friendly label may differ from the actual hyperlink address and is useful for providing descriptive or meaningful link text. This value is read-only. |
315
315
316
316
{% tabs %}
@@ -348,16 +348,16 @@ The `HyperlinkClick` event is triggered when a hyperlink within the spreadsheet
348
348
349
349
**Purpose**
350
350
351
-
This event is designed for observing hyperlink interactions and executing custom logic in response. Since all event arguments are read-only, it is not intended for modifying the hyperlink but rather for handling actions that follow a click - such as auditing, validation, or UI updates.
351
+
This event is designed for observing hyperlink interactions and executing custom logic in response. Since all event arguments are read-only, it is not intended for modifying the hyperlink but rather for handling actions that follow a click, such as auditing, validation, or UI updates.
352
352
353
353
**Event Arguments**
354
354
355
355
The [HyperlinkClickEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkClickEventArgs.html) includes the following properties:
356
356
357
357
| Event Arguments | Description |
358
358
|----------------|-------------|
359
-
| Uri | Represents the hyperlink destination, which may be an external web URL (e.g., **"https://example.com"**) or an internal sheet references. This value reflects the actual navigation target of the hyperlink. This value is read only. |
360
-
| CellAddress | Specifies the cell location where the hyperlink resides. The address is provided in A1 notation (e.g., **"A1"**, **"B5"**), indicating the exact position of the hyperlink in the worksheet. This value is read only. |
359
+
| Uri | Represents the hyperlink destination, which may be an external web URL (e.g., `https://example.com`) or an internal sheet reference. This value reflects the actual navigation target of the hyperlink. This value is read only. |
360
+
| CellAddress | Specifies the cell location where the hyperlink resides. The address is provided in A1 notation (e.g., `A1`, `B5`), indicating the exact position of the hyperlink in the worksheet. This value is read only. |
361
361
| DisplayText | Defines the visible text shown in the cell for the hyperlink. This user-friendly label may differ from the actual hyperlink address and is useful for identifying the link's purpose or context. This value is read only.|
362
362
363
363
{% tabs %}
@@ -393,4 +393,4 @@ The [HyperlinkClickEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.B
0 commit comments