Exporting data to Excel from Code

When using a Grid Table that is bound to an Entity Set, the Export button is not available.  To enable the export capabilities, the developer will need to create a custom Table Toolbar and button to allow the user to perform the export.

Exporting from a Custom Table Toolbar Button


  1. Right click on the Grid Table control and add a Toolbar Container.
  2. Right click on the Toolbar Container and add a Toolbar.
  3. Right click on the Toolbar and add a Button.  (Configure the icon/text of the button as needed)
  4. Go into the Actions if Pressed property of the button to configure the action.
  5. Select Script for the Action and fabTableExportButtonPressed(evt) as the Parameter.

    You could also call a JavaScript function from here that contains the fabTableExportButtonPressed(evt) command.  Ensure that the function you create also takes in the (evt) parameter so that can be passed through correctly.



Exporting from other JavaScript Code


  1. Add a JavaScript function into a Script node that contains the following command:

    fabExportTableData(tableName);

    Replace tableName with the ID of the table you would like to export data from.

  2. Add a button or some other way that the JavaScript function can be called.