2.25. export
Exports a database to a delimited text file (see also import).
2.25.1. Summary
Parameters: table
Positional parameters in same order.
- table
- The table to export
- file
- Filename to export to. Note that the NoAbsolute directive and other conditions may affect actual location of the output file.
- type
- Specifies the [line, record] delimiter types. Either NOTES or one of the following:
my %Delimiter = ( 2 => ["\n", "\n\n"], 3 => ["\n%%\n", "\n%%%\n"], 4 => ["CSV","\n"], 5 => ['|', "\n"], 6 => ["\t", "\n"], 7 => ["\t", "\n"], 8 => ["\t", "\n"], LINE => ["\n", "\n\n"], '%%%' => ["\n%%\n", "\n%%%\n"], '%%' => ["\n%%\n", "\n%%%\n"], CSV => ["CSV","\n"], PIPE => ['|', "\n"], TAB => ["\t", "\n"], );
- If using NOTES
- notes_separator (defaults to "\f")
- notes_field (defaults to "notes_field")
- field
- The column to add (or delete if delete and verify are true)
- delete
- If 'verify' attribute also set, deletes column specified by 'field' attribute rather than adding a column.
- verify
- must be true when deleting a column
- sort
- Output sorted rows (usage: sort="sort_field:sort_option") (see search/form variable 'mv_sort_option' for sort options)
The attribute hash reference is passed to the subroutine after the parameters as the last argument. This may mean that there are parameters not shown here.
Must pass named parameter interpolate=1 to cause interpolation.
Invalidates cache: YES
Called Routine:
ASP-like Perl call:
$Tag->export( { table => VALUE, } ) OR $Tag->export($table, $ATTRHASH);
Attribute aliases
base ==> table database ==> table
2.25.2. Description
Exports 'table' to a delimited text file. See also import tag which imports files into databases.