Converting Hyperlinks
SaveToDB products automatically detect cell URLs and allow you to open them via the context menu.
You can configure URL conversion to hyperlink objects that open on click using the AddHyperlinks event in the xls.handlers table.
This feature is also useful for creating an interactive table of contents by linking to related database objects in an Excel or DBEdit workbook.
Here’s an example configuration:
ID | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | EVENT_NAME | HANDLER_SCHEMA | HANDLER_NAME | HANDLER_TYPE | HANDLER_CODE |
---|---|---|---|---|---|---|---|---|
dbo | view_index | object | AddHyperlinks | ATTRIBUTE |
Below is a sample Microsoft SQL Server view that generates the table of contents:
CREATE VIEW [doc].[view_index] AS SELECT ROW_NUMBER() OVER(ORDER BY s.name, o.name) AS [#], s.name + '.' + o.name AS [object] FROM sys.objects o INNER JOIN sys.schemas s ON s.[schema_id] = o.[schema_id] WHERE o.[type] IN ('U', 'V', 'P') AND s.name IN ('doc') AND NOT o.name LIKE 'xl_%' AND NOT o.name LIKE '%_change'