ONIXEDIT PRO allows you to export the contents of an ONIX file to a Flat File (CSV, tab-delimited or fixed length) as well as Excel files. If you bought ONIXEDIT Pro or the optional Import/Export generic tool offered with the regular edition, you will be able to use this module. The export function is identical to the import function (see section Importing a Flat File ). In fact, import scripts and export scripts are interchangeable. It is therefore possible to create an import script to read and convert a Flat File in ONIX, then perform the inverse operation using the same script.


To access the export function to a Flat File, simply follow these steps:


1- Open the ONIX file you want to export.

2- In the main list, select the titles you want to export.

3- In the File menu, choose "Export" (F5).

4- Choose whether you want to export only the selected titles or all titles of the current file.

5- Then click on the "Export to Flat File" button.


The Flat File import/export tool appears. Refer to section Importing a Flat File for details on its usage.



Helpful Hint #1:


Above, we said that ONIXEDIT import and export scripts are interchangeable. However, this is possible only if the import script does not contain any Fixed Values or if the Fixed values are set to be non-exportable within the script. 



Indeed, to be interchangeable, the flat files exported must have the same number of columns required by the import script. When you set a fixed value for a column of an import script, that column is not really defined in your flat file. The fixed value is dynamically added at runtime by ONIXEDIT. But the behaviour of fixed values differ for exports. By default, a fixed value is exported to the flat file creating an additional column that you don't expect if you are importing the flat file with that same script later. For that reason, we have the option "Do not export this element" that will make import/export files with the same count of columns.


Helpful Hint #2:


A console application named OnixEditImport.exe can be used to perform batch processing with your ONIXEDIT import/export scripts. Refer to section Bulk import of Flat Files for details on its usage.


Helpful Hint #3:


If you have multiple records of a specific ONIX composite like for the MainSubject in the example below:


    <MainSubject>

      <MainSubjectSchemeIdentifier>10</MainSubjectSchemeIdentifier>

      <SubjectCode>JNF003000</SubjectCode>

      <SubjectHeadingText>JUVENILE NONFICTION / Animals / General</SubjectHeadingText>

    </MainSubject>

    <MainSubject>

      <MainSubjectSchemeIdentifier>12</MainSubjectSchemeIdentifier>

      <SubjectCode>JFFZ</SubjectCode>

      <SubjectHeadingText>Animals & society</SubjectHeadingText>

    </MainSubject>

    <MainSubject>

      <MainSubjectSchemeIdentifier>93</MainSubjectSchemeIdentifier>

      <SubjectCode>AGNA</SubjectCode>

      <SubjectHeadingText>Animals in art</SubjectHeadingText>

    </MainSubject>


If you just place the SubjectCode ONIX element as an export column, ONIXEDIT will export the first subject it will find (the BISAC one):



But what if you need to export the BIC subject instead? A first solution is to specify the type BIC for the MainSubject group: 



But if you need to export the MainSubjectSchemeIdentifier ONIX Element to the flat file, this won't work. For that reason, it is possible to filter a group using a specific value:



However, you can set only one filter per group. If you need more precision and flexibility, you can define an XPATH column (next hint).


Helpful Hint #4:


When setting a group type or filter is not enough to get exactly the result that you need, your best weapon is the XPATH column:




Please, consult section Defining XPATH expressions for more details.