xls.handlers

xls.handlers

The xls.handlers table is a part of the SaveToDB Framework used to configure application features:

Below is a configuration sample:

The table has the following fields:

  1. ID
  2. TABLE_SCHEMA
  3. TABLE_NAME
  4. COLUMN_NAME
  5. EVENT_NAME
  6. HANDLER_SCHEMA
  7. HANDLER_NAME
  8. HANDLER_TYPE
  9. HANDLER_CODE
  10. TARGET_WORKSHEET
  11. MENU_ORDER
  12. EDIT_PARAMETERS

Use TABLE_SCHEMA and TABLE_NAME to define a database object being configured.

Use COLUMN_NAME to define a column or parameter being configured. Leave it blank for table-level handlers.

Use EVENT_NAME to define an event type. See the description below.

Use HANDLER_SCHEMA and HANDLER_NAME to define a handler object.

Use HANDLER_TYPE to define the handler type. See the description below.

Use HANDLER_CODE to define a handler-specific code like an SQL code or URL.
You may leave it blank for SQL-based objects configured in xls.objects.

Use TARGET_WORKSHEET to configure a handler-specific output. See the description below.

Use MENU_ORDER to define menu item order in the application and context Actions menus.

Use EDIT_PARAMETERS to show or hide the Edit Parameters dialog box before executing menu items.

Note that DBEdit supports a subset of features configured in the SaveToDB add-in.

However, it has the same behavior for supported features. So, developers do not need to create separate configurations.

Also, note that you may create your tables and views with the xls.handlers field structure. DBEdit reads multiple configuration objects as well.

Event Types

DBEdit supports the following event types in the EVENT_NAME field:

  • Actions
  • ContextMenu
  • Change
  • ValidationList and SelectionList
  • ParameterValues
  • DoNotSave
  • DoNotChange
  • DoNotAddValidation
  • ProtectRows
  • AddHyperlinks
  • License

Use Actions to configure the application Actions menu.

Use ContextMenu to configure the context Actions menu.

Use Change to define server-side cell change handlers.

Use ValidationList and SelectionList types to define lists of cell values.
DBEdit has the same behavior for both types, while the SaveToDB add-in has different.

Use ParameterValues to define lists of parameter values.

Use DoNotSave to disable saving data changes using the Save button.

DBEdit does not use the DoNotChange type. However, it disables adding automatic value lists if the handler exists.

Use DoNotAddValidation to disable adding automatic value lists.
For example, to use identifier values instead of values from a foreign key table.

Use ProtectRows to disable adding and deleting rows by a user.

Use AddHyperlinks to add hyperlinks for URLs or connected database object names in the specified column.
For example, this allows using database views and procedures as workbook indexes.

The License handler allows saving changes of the specified object in a free DBEdit version.
It is used in other Gartle products like Business Time Tracker or Market.db.

Handler Types

DBEdit supports the following handler types in the HANDLER_TYPE field:

  • TABLE, VIEW, FUNCTION, and PROCEDURE
  • CODE, HTTP, CMD
  • VALUES
  • MENUSEPARATOR
  • SHOWSHEETS and HIDESHEETS
  • SELECTSHEET

Use TABLE, VIEW, FUNCTION, or PROCEDURE for existing objects.

Note that you may customize select and where fields for tables and views.

Use CODE for SQL-based objects, HTTP for URLs, and CMD for Windows commands or batch files.

Place the code and URLs of the CODE, HTTP, and CMD handlers into the HANDLER_CODE field.

Use VALUES for comma- or semicolon-separated values. Place values into the HANDLER_CODE field.

Use MENUSEPARATOR to add a separator into the Actions menu. Specify a unique handler name and its menu order.

Use SHOWSHEETS and HIDESHEETS to show or hide worksheets. Specify a comma-separated list of database object names the HANDLER_CODE field.

Use SELECTSHEET to select a worksheet. Specify a database object name in the TARGET_WORKSHEET field.

TARGET_WORKSHEET Values

DBEdit supports the following specific keys in the TARGET_WORKSHEET field:

  • _none, _msgbox, _popup, and _taskpane
  • _transpose and _transposeauto
  • _reload
  • _commit

Use _none to execute the handler in a silent mode.

Use _msgbox to show the handler output in the modal message box.

Use _popup or _taskpane to show the handler output in a separate window.

Use _transpose and _transposeauto to transpose an output table. In the last case, DBEdit selects the best display form itself.

Use _reload to reload data when the handler finished. You may combine this value with the _popup option.

Use _commit with the cell change handlers to point out that the handler commits changes in a database.

This website is using cookies. By continuing to browse, you give us your consent to our use of cookies as explained in our Cookie Policy.