Skip to main content

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.

Prerequisites
  • 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.
  1. In the Fields Table, select a column.
  2. Expand the General tab in the field properties panel.
  3. Next to Format, click the button to open the dialog.
  4. In Categories, choose Hyperlink.
  5. Click Ok.
  6. On the File tab, click Save Data Model.

Use this method when URLs need to be built dynamically based on other column values.

  1. In the Fields Table, right-click the column and select Add Calculated Column.
  2. (Optional) In Column Heading, add a custom name.
  3. Expand the Advanced tab.
  4. In Data Type, select CHAR from the dropdown list.
  5. Expand the General tab.
  6. Next to Format, click the button to open the dialog.
  7. In Categories, choose Hyperlink.
  8. Click Ok.

Add custom URL calculation

  1. Expand the General tab.
  2. Next to Calculation, click the button to open the SQL Scripts Builder dialog.
  3. In the script editor, enter the SQL expression that builds your hyperlink.
  4. Click Validate to check your logic.
  5. Click Ok.
  6. 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) + ')'

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:

  1. Quit all running programs.
  2. Press Windows + R, enter regedit, and press Enter.
  3. 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
  4. Right-click the Internet subkey, select New > DWORD (32‑bit) Value.
  5. Name it ForceShellExecute.
  6. Set Value data to 1, and click OK.
  7. Close the Registry Editor.