NTPSetOption (TXT export)

 

The text export module may be used in one of two different modes (NTPOPTION_TXTEXP_ONLYTABLEDATA). The data mode returns the data of a table object in a text fomat. Properties such as column borders and column seperation may be freely defined. Individual datasets are seperated by a line break. The result is a single text file which contains the data of all table objects. This can then be edited in external applications. Please note, that this mode exports only data in table objects, all layout information is ignored. This means layout based breaks are filtered from the exported text. This mode is available only for table projects. As an alternative, it is possible to create a text file - provided the format supports this - that shows the formatting of the original project. Please note, that the font size should be selected in a way, that makes it possible to resolve the individual lines in the text export. Small fonts may lead to overwritten lines, meaning lines will be lost in the resulting file.

 

The following is a description of all options supported by the text export module. These options can be set by using the NTPSetOption function.

 

 

NTPOPTION_TXTEXP_TEXT

Defines how text objects in table columns are to be exported.

0 = Ignore object

1 = Object as complete text object

Default:  1

 

 

NTPOPTION_TXTEXP_RTF

Defines how RTF objects in table columns are to be exported.

0 = Ignore object

1 = Object as RTF stream

2 = Object as unformatted text

Default:  1

 

 

NTPOPTION_TXTEXP_TABLE

Defines how table objects are to be exported.

0 = Ignore object

1 = Object as complete table object

Default:  1

 

 

NTPOPTION_TXTEXP_TABLECELL

Defines how table cells are to be exported.

0 = Ignore cells

1 = Object as complete cell object (in accordance with the verbosity settings of the appropriate object type)

Default:  1

 

 

NTPOPTION_TXTEXP_PATH

Provides the path for the text file to be generated. If empty, the file selection dialogue is shown.

 

 

NTPOPTION_TXTEXP_FILE

Provides the file name.

Default: "default.txt"

 

 

NTPOPTION_TXTEXP_QUIET

Defines if the export is to take place with user interaction.

0 = Interaction allowed/dialogues will show

1 = No selection dialogue (provided Export.File is set) and no "overwrite?" security warning.

Default:  0

 

NTPOPTION_TXTEXP_SHOWRESULT

Specifies if, after the export, the application linked to the appropriate file extension is to be launched.

0 = Do not launch

1 = Does a ShellExecute() on NTPOPTION_XLSEXP_FILE, which will normally cause a text editor or a similar application to be launched.

Default: 0

 

 

NTPOPTION_TXTEXP_ONLYTABLEDATA

Allows an export of only data contained in table cells.

0 = All objects are exported

1 = Only table cells with their data are exported ("data mode")

Default:  1

 

 

NTPOPTION_TXTEXP_ALLINONEFILE

Configures the resulting export file. This option is not active in the "data mode" (see NTPOPTION_TXTEXP_ONLYTABLEDATA).

0 = The result are n text files, one for every printed page. The file names are sequentially numbered (with the exception of the NTPOPTION_TXTEXP_FILE start file). If the file name of the start file contains the "%d" then this will be replaced by the valid page number

1 = The result is a single TXT file (NTPOPTION_TXTEXP_FILE), in which all printed pages are ammended.

Default : 1

 

 

NTPOPTION_TXTEXP_TXTFRAMECHAR

This command sets the character that defines the structure delimiters. This option is only active in the data mode (see NTPOPTION_TXTEXP_ONLYTABLEDATA).

NONE = No structure delimiter

"  " = as structure delimiters

'  ' = as structure delimiters

 

 

NTPOPTION_TXTEXP_TXTSEPARATORCHAR

This command sets the character that defines the column seperators. This option is only active in the data mode (see NTPOPTION_TXTEXP_ONLYTABLEDATA).

NONE = No column seperators

,  , = as column seperators

;  ; = as column seperators

 

 

NTPOPTION_TXTEXP_TXTIGNOREGROUPLINES

Ignores group headers and group footers if these are not to show in the resulting text file. Only shows an effect in the data mode (see NTPOPTION_TXTEXP_ONLYTABLEDATA).

0 = Group headers and group footers are exported

1 = Group headers and group footers are ignored

Default:  1

 

 

NTPOPTION_TXTEXP_TXTIGNOREHEADERFOOTER

Ignores headers and footers if these are not to show in the resulting text file. Only shows an effect in the data mode (see NTPOPTION_TXTEXP_ONLYTABLEDATA).

0 = Headers and footers are exported

1 = Headers and footers are ignored

Default:  1

 

 

NTPOPTION_TXTEXP_TXTCHARSET

Defines the character set of the resulting file.

ANSI = Ansi-character set

ASCII = Ascii-character set

Default:  ANSI