Add Hyperlinks
You can add hyperlink fields to a data model so that users can click a cell in a worksheet and open the linked web page in their browser. Hyperlinks can come directly from a database column containing URLs or be created as custom calculated columns. After you add a hyperlink field, open any worksheet from the data model, include the Hyperlink (URL) field, and test by clicking links in the worksheet grid.
Create a hyperlink from a database
- Your database table must have a column storing the complete URL.
- The table must already be part of your data model and the field visible in the Fields Table.
Configure hyperlink format
- In the Fields Table, select a column.
- Expand the General tab in the field properties panel.
- Next to Format, click the button to open the dialog.
- In Categories, choose Hyperlink.
- Click Ok.
- On the File tab, click Save Data Model.
Create a custom calculated column hyperlink
Use this method when URLs need to be built dynamically based on other column values.
Configure hyperlink format
- In the Fields Table, right-click the column and select Add Calculated Column.
- (Optional) In Column Heading, add a custom name.
- Expand the Advanced tab.
- In Data Type, select CHAR from the dropdown list.
- Expand the General tab.
- Next to Format, click the button to open the dialog.
- In Categories, choose Hyperlink.
- Click Ok.
Add custom URL calculation
- Expand the General tab.
- Next to Calculation, click the button to open the SQL Scripts Builder dialog.
- In the script editor, enter the SQL expression that builds your hyperlink.
- Click Validate to check your logic.
- Click Ok.
- On the File tab, click Save Data Model.
Examples SQL expressions
HTML anchor tag: Creates a clickable link in HTML format with a target=_blank attribute to open in a new tab.
'<html><a href="https://necca01l0006.nectariqa.com/StandAlone/Index?PID=490000414&VID=490000398&envID=e2d8dcf6-ad78-4d9d-b996-163fe39b018b&OpeningAction=LinktoView&CP=2a1aad5a&F='
+ cast([InvoiceLines].[StockItemID] as nvarchar)
+ '" target=_blank">'
+ cast([InvoiceLines].[StockItemID] as nvarchar)
+ '</a></html>'
Simplified HTML anchor tag: Uses a concatenated HTML link without extra <html> wrapper.
'<a href="https://necca01l0006.nectariqa.com/StandAlone/Index?PID=490000414&VID=490000398&envID=e2d8dcf6-ad78-4d9d-b996-163fe39b018b&OpeningAction=LinktoView&CP=2a1aad5a&F='
+ cast([InvoiceLines].[StockItemID] as nvarchar)
+ '" target=_blank">'
+ cast([InvoiceLines].[StockItemID] as nvarchar)
+ '</a>'
Plain URL: Stores the complete link without any HTML formatting. The hyperlink format in the column properties makes it clickable.
'https://necca01l0006.nectariqa.com/StandAlone/Index?PID=490000414&VID=490000398&envID=e2d8dcf6-ad78-4d9d-b996-163fe39b018b&OpeningAction=LinktoView&CP=2a1aad5a&F='
+ cast([InvoiceLines].[StockItemID] as nvarchar)
Markdown-style link: Uses Markdown syntax to create a clickable text label that links to a search query.
'[' + cast([InvoiceLines].[StockItemID] as nvarchar) + '](https://www.google.ca/search?q='
+ cast([InvoiceLines].[StockItemID] as nvarchar) + ')'
Export a worksheet with an hyperlink
When exporting a worksheet containing hyperlinks, take one of the following actions before opening the file in Excel:
Option 1 — keep browser session active
Open the hyperlink in your browser and enable a setting that saves session cookies (for example, "Remember me" when logging in). Links will work in other browsers after this step.
Option 2 — change the Office registry setting
See Microsoft support article for full details.
Summary of registry steps:
- Quit all running programs.
- Press Windows + R, enter
regedit, and press Enter. - In the Registry Editor, go to one of these subkeys (create if missing):
- 32‑bit Office on 64‑bit Windows:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\9.0\Common\Internet - 64‑bit Office on 64‑bit Windows:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\9.0\Common\Internet
- 32‑bit Office on 64‑bit Windows:
- Right-click the Internet subkey, select New > DWORD (32‑bit) Value.
- Name it
ForceShellExecute. - Set Value data to
1, and click OK. - Close the Registry Editor.