Exportizer Users' Guide vlsoftware.net

Exporting Data

Contents Index Previous Next

To copy or export the data from open database, use Export button or items from Export menu.

Description of export actions:

Export to File or Database - data from opened data set are exported to file or relational database
Export all Tables - data from all tables of the opened database are exported to files or relational database (available only in Exportizer Pro)
Export Selected Tables - data from all selected tables of the opened database are exported to files or relational database (available only in Exportizer Pro); to select tables, please set select tables mode using the corresponding button above the table list; you cannot open tables for browsing the data in this mode

Copy to Clipboard - data from opened data set are copied to clipboard

Generate Command Line - command line is generated using source database, source data set, and specified interface and export options

When you select an action, Export dialog window will appear. Select needed export format and options (see below) and click the corresponding button to perform selected action. Then, if 'Generate Command Line' action was selected, you will see the command line, which can be then copied and used, for example, in you batch files. In other cases, the data will be exported to specified target.

Export options
Target formats and format related options
       Text / CSV

Use this format to export data to plain text file, including CSV (comma separated values). Export is done by Exportizer engine with direct file access and therefore is very fast.

Specific options:

File - when exporting data from one table or SQL query, specify a file name to export data to.
Folder - when exporting data from a group of tables (multi-table export), specify a folder name to export data to. Each table will be exported to a separate file in the specified folder; file names can be specified in Table Mappings.

Schema - specify schema of exporting

Standard Data are exported to single output file (without using schema file).
ADO

Data are exported to one file, and the schema (description of the fields) is stored in a separate file Schema.ini, which is located in the output folder and used for all such files from this folder. The format of the schema files is compatible with Microsoft Data Access Components (MDAC) specification, so such output files can be correctly opened in any program that uses ADO, including Database Tour.

Notes
Schema file is not created when data are exported to clipboard.

BDE

Data are exported to one file, and the schema (description of the fields) is stored in a separate file file_name.sch, where file_name equals to file name of the main file but without extension. The format of the schema files is compatible with Borland Database Engine (BDE) specification, so such output files can be correctly opened in any program that uses BDE, including Database Tour.

Notes
Schema file is not created when data are exported to clipboard.

Expression

Data are exported to one file, which content is generated using dynamically calculated expression specified by the user. For each source record, the expression is calculated and the the result of the calculation is written to one target line. The expression should produce one-line string (i.e. result of its calculation should not contain line feed and carriage return characters). This schema is available only in Exportizer Pro.

Use this schema if you want to define custom format for target rows or apply some rules which are not available in other schemas. For example, the following expression produces semicolon separated rows, and in each row, it concatenates two fields into one and converts another field to lower case:

dataset_field_val(1, 'app_tittle') + ' ' + dataset_field_val(1, 'app_version') + ' ; ' + lower(dataset_field_val(1, 'app_url'))

 

Notes
Such export options as, for example, field separator and field mappings, are ignored when exporting using this schema because their role is played by the expression.

Field separator - specify character, which is used to separate fields in output file. If 'None' specified, no separator will be used, and the output file will have fields with fixed length. In fixed-length files, field data, which shorter than the field width, is completed by spaces.
Delimit all fields - specify either to delimit all fields in target or not. Using this option will cause all fields to be double quoted (because the field delimiter is a double quote); otherwise, only text fields will be quoted.
Include MEMO fields - specify either to include contents of MEMO fields in target or not; in the latter case, a constant describing the field type will be used instead of the field contents. MEMO fields can store large amount of text, so including them for this target format can significantly affect the results, especially if the text contains line or column breaks or other special characters.
Include column names - specify either to include the column names in target or not. Ignored for BDE schema.
Line break - specify Line break style; if you select Windows, then each line in the file will be terminated by carriage return and new line character (CR+LF), otherwise Unix style will be used (LF).

Export mode - specify export mode

REPLACE+INSERT Target is created and filled with incoming rows; if target already exists, it is overwritten.
CREATE_OR_REPLACE Blank target (using appropriate structure) is created; if target already exists, it is overwritten.
APPEND

Target is appended with incoming rows; if target does not exists, it is created. Available only in Exportizer Pro.

Notes
The format and field structure must be compatible with existing target.

Ask before overwrite or empty existing target - specify either to ask the user to overwrite existing target for REPLACE+INSERT and CREATE_OR_REPLACE export modes.

       Excel
       Excel (XLSX)
       Excel (XML-based)
       HTML
       XML
       dBase
       RTF
       PDF
       SYLK
       Excel (OLE)
       Word (OLE)
       SQL Script
       Database
Additional export options

Limit the record count to

Specify a maximum number of records to be exported. If this option is not specified or it is less then 1, all records from the specified record range will be exported. If you want just create a file (table) without data exporting, use the corresponding Export mode instead.

Source records per target row

Specify a number of records from source database to be placed into one line of the target file. For example, if you specify 2, the source data will be placed to the target in the following way:

Source Target
FIELD1 FIELD2   FIELD1 FIELD2 FIELD1 FIELD2
cell1 cell2 cell1 cell2 cell3 cell4
cell3 cell4   cell5 cell6 cell7 cell8
cell5 cell6          
cell7 cell8          

This option is useful when source have a small count of columns and a large count of rows. Using it, you can fill target area more optimally.

Notes
This option is not applied to XML, dBase, PDF, SYLK, and Database target formats.

Record range

Specify range of source records to be exported:

Full table - full table is exported.
Selected records only - only selected records are exported. To select rows, click the corresponding button and then select needed rows using Shift, Ctrl and arrow keys.
From current record to the last one - all data between current and the last records are exported.

Notes
For some target formats or some export options, not all record ranges can be used.

Column range

Specify range of source columns to be exported:

All columns - all columns (including columns, which were temporary hidden by user) are exported.
Selected column only - only selected (current) column is exported.
Visible columns - only visible columns are exported.

Notes
For some target formats or some export options, not all column ranges can be used.

Field mappings (available in the second step, when exporting one table)

Specify source-to-target field mappings. Left column must contain a list of source fields or dynamic expressions, and the right column must contain a corresponding list of the target fields. When using dynamic expression instead of source field name, the expression must be declared as a parameter of vle_expr macro, i.e. inside the parentheses following vle_expr keyword; this will tell the program to interpret the construction as expression but not the field name.

Field mappings can be saved to or loaded from a field mappings file. Use the field mappings files whenever you need the same field mappings to be used more than once.

If you skip this step, the list of the source columns (fields) to export and the target field names are determined automatically using selected format related options and data range options. Automatic determination of the target field names may be not desirable, for example, when using Append export mode and the target object (table or file) already exists.

Notes
1. Manual field mappings changing is not available when exporting group of tables. In this case, the field mappings for each exported table are built automatically by the program using source names and, to the extent possible, naming rules of target database or file system.
2. After manually changing the filed mappings, if you go back to the previous step and change the source or significant export options, your changes will be discarded and default mappings will be created.

Table mappings (available in the second step, when exporting group of tables)

Specify source-to-target table mappings.

Table mappings can be saved to or loaded from a table mappings file. Use the table mappings files whenever you need the same table mappings to be used more than once.

If you skip this step, the table mappings are built automatically by the program using source names and, to the extent possible, naming rules of target database or file system.

Notes
1. Table mappings can have different target attributes for different output formats; for example, for HTML output format, a document title attribute is available. Depending on current program context, some target attributes are prepared automatically and cannot be changed manually.
2. After manually changing the table mappings, if you go back to the previous step and change the source or significant export options, your changes will be discarded and default mappings will be created.

Available target attributes

Attribute Target Format Description
Target File All except Database File name to export data to.
Target Table Database, SQL For Database target format, specifies a table name to export data to. For SQL target format, specifies a table name to be used in generated SQL commands.
Document Title HTML The text to be placed into HTML Title tag.
Table Id HTML The text to be placed into id attribute of HTML Table tag.
Table Title HTML, RTF, Excel (XML based) The text to be placed above the table data in the target document.
Step No HTML Current export step.
GUI options

Close this window after clicking Export/Copy/Generate

When you select this option, the export dialog will be closed right after you click Export/Copy/Generate button; otherwise, the export dialog will remain open even when your action is done and you will be able to quickly change the options and repeat your action. This option is available only if you export data from one table.

Open target after successful exporting

When you select this option, and export operation was successful, then the target is opened by software, which is set as default software for the target type. In multi-table exporting, only the last created target file or table is opened.

See also

 Printing Data

 Command Line Usage

 Exporting to HTML Using Template

 Expression Engine