ws.hyperlinks
WorksheetHyperlinks
WorksheetHyperlinks — Sub-API for cell hyperlink operations. Provides methods to set, get, and remove hyperlinks on cells.
6 methods
set
→ Promise<void>set(address: string, url: string): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| address | string | required |
| url | string | required |
Set a hyperlink on a cell. @param address - A1-style cell address (e.g. "A1") @param url - Hyperlink URL
get
→ Promise<string | null>get(address: string): Promise<string | null>;| Parameter | Type | Required |
|---|---|---|
| address | string | required |
Get the hyperlink URL for a cell. @param address - A1-style cell address @returns The hyperlink URL, or null if no hyperlink
has
→ Promise<boolean>has(address: string): Promise<boolean>;| Parameter | Type | Required |
|---|---|---|
| address | string | required |
Check if a cell has a hyperlink. @param address - A1-style cell address @returns True if the cell has a hyperlink
remove
→ Promise<void>remove(address: string): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| address | string | required |
Remove a hyperlink from a cell. @param address - A1-style cell address
list
→ Promise<Array<{ address: string; url: string }>>list(): Promise<Array<{ address: string; url: string }>>;List all hyperlinks in the worksheet. @returns Array of hyperlink entries with cell address and URL
clear
→ Promise<void>clear(): Promise<void>;Remove all hyperlinks from the worksheet.