Skip to content

export command

Frank Stüber edited this page Jun 16, 2026 · 6 revisions

The export Command

Exports data from an OpenCodeList file to a supported destination format.

ocl export
    {--file | -f} <file-path>
    --to-format {csv | xlsx}
    --to-file <file-path>

For an explanation of the command-line notation, see Command-Line Syntax.

Description

The export command exports data from an OpenCodeList file to a supported destination format.

The following destination formats are supported:

  • Comma-Separated Values (CSV)
  • Microsoft Excel (XLSX)

Examples

Example 1

Exports data from an OpenCodeList file to a CSV file.

ocl export --file countries.ocl --to-format csv --to-file countries.csv

Example 2

Exports data from an OpenCodeList file to an Excel workbook.

ocl export --file countries.ocl --to-format xlsx --to-file countries.xlsx

Parameters

  • --file or -f

    Specifies the source OpenCodeList file to export.

  • --to-format

    Specifies the destination file format.

    Supported values:

      + `csv`
      + `xlsx`
    
  • --to-file

    Specifies the destination file to be created.

Clone this wiki locally