TabExporter

Overview

The TabExporter plugin enables exporting data from a Servoy FoundSet into text-based formats such as CSV or tab-separated files. This is useful for generating reports or sharing data with external systems.

The addDataProvider method allows specifying the data providers (columns) from the FoundSet to include in the export. Each column can be customized with attributes such as header text, value lists, or date formats, providing flexibility in how data is represented.

The textExport method generates the export as a text string based on the defined configuration. This string can then be saved to a file or used directly for sharing or further processing.

Methods Summarized

Type
Name
Summary

Add a dataprovider from specified foundset to export.

Export to text 'separated value' data (*.

Methods Detailed

addDataProvider(dataprovider)

Add a dataprovider from specified foundset to export.

Parameters

  • String dataprovider The dataprovider string to add as a column to export

Returns: DataProviderExport dataprovider export object

Sample

var exporter = plugins.textxport.createExporter(forms.form1.foundset,';',true);
exporter.addDataProvider('orderid').setHeaderText('Order ID');
exporter.addDataProvider('item_id').setValueList('myvaluelist');
exporter.addDataProvider('mydate').setFormat('yyyy/dd/MM');
var content = exporter.textExport();

textExport()

Export to text 'separated value' data (*.tab/*.csv), based on values set on exporter

Returns: String exported text

Sample

var exporter = plugins.textxport.createExporter(forms.form1.foundset,';',true);
exporter.addDataProvider('orderid').setHeaderText('Order ID');
exporter.addDataProvider('item_id').setValueList('myvaluelist');
exporter.addDataProvider('mydate').setFormat('yyyy/dd/MM');
var content = exporter.textExport();

Last updated