LEX comes with a feature to export the object list LDAP data. This function lets you export the content of the current object list in the LEX main window. All the object names and data columns which you configured to be shown are exported:
So whatever you want to export to a file, you first have to configure your object list to contain the desired data. You can learn more about configuring the columns in the manual topics about the Attribute Columns in the Object List and in the topics about the menu options View - Use as List Column and View - Column Field Chooser - More.
To initiate the export operation, you have to use the menu option Tools - Directory Export-Object List. Or you use the Option Export Object List from the context menu somewhere in the object list panel:
After this, the Export Object List window is shown:
This is the place where you can configure all relevant options for the data export. According to the output format, you can choose between Microsoft Excel, XML, LDIF or raw text. Please note that on the right side of the Export Object List dialog, there is NO REAL data shown: It's only an example how it MAY look like - it's just DUMMY data!
Lets have a look at the different export options:
Output format type: Excel, XML, LDIF, Text
These are the different output formats. Please note that you cannot export data to the Excel format if there is no Microsoft Excel installed on the machine. The LDIF format export fully supports the LDAP Data Interchange Format as specified in RFC 2849. For the Text output format, you can specify a character which is used to separate the attribute values in a text line. By default, the semicolon in used for that:
Append data if output file exists
This option is not available if you are exporting to the XML format.
Output with attribute name headers
This option is not available if you are exporting to the XML or LDIF format.
HexString output for binary attributes
If you activate this option for Excel, XML or Text export, the binary attributes are translated in a hex string (as described in the topic about Displaying Binary Attributes). Otherwise, LEX tries to show these values in their ASCII representation. If you choose to export values to separate files (see below, than deactivate this option and you get the raw attribute values in the export files!
If you export to LDIF, this option is not visible, instead there is this one:
Text with special chars as UTF-8 (pure binary always as Base64)
Normally, all values which are not 7 Bit ASCII have to be encoded in Base64 in an LDIF file. So if you have attribute values with special characters, this encoding is performed. Because a lot of LDAP servers can process special characters in LDIF files in the meantime, and because Base64 encoded values are hard to read for human eyes, this option can suppress of this behavior. If you activate the option, the encoding is done in easy-to-read UTF-8 characters. Please note that LEX encodes Base64 for binary values no matter what this option is configured to.
Prepare LDIF file for re-import
This option is only available if you export format is LDIF. If the option is activated, there are lines included in the export file, which allows this LDIF to import objects. so you can export objects to import them in another directory, for example. The regarding lines in the LDIF file is this one:
Condensed output for Multivalued attributes
This option is not available if you are exporting to an LDIF file. If you activate this option, multivalue arrays are written to the export file as one line with '____ARRAY____' including the value count. Otherwise LEX exports all values for this multivalue.
Multivalues attributes in one single line
This option is only available if you are exporting to the Excel or Text format. It determines, if there should be separate lines when the attribute value is multivalued. Otherwise all values are written to the same cell (Excel) or line (Text). In Text export mode, you can choose the separator character for this. By default, the % is used for this.
Please note that in Excel outputs there could be a limitation when you export multivalues to one cell (when this option is deactivated). There could be an overflow of the Excel cells if you have huge attribute values (for example group memberships with thousands of members).
Create data files for these columns
You can specify one or more columns of your object list here. LEX doesn't write the attributes values for these columns into the main export file, but creates separate value files for each object. This is very useful if you have raw binary attributes in the object list which you want to store in files (Certificate data, JPeg Photos and so on...).
If you specified attributes for this, LEX creates a subdirectory with the same name as the export main file, in the main file, there will link to the separate data file:
There are some options for configuring the export to these separate files:
File Extension for attribute files: ...
You can set the file extension for the separate attribute files - according to the type of attribute(s) you want to export here.
Create Short Filenames
If you activate this option, the separate attribute value files are named only with the short relative distinguished name of the regarding object, for example like this
Otherwise the full distinguished name is used for the file name:
Show relative path in parent document
This option determines the link in the main export file. If you use relative paths to the separate value files, you can move the whole export data to another directory without breaking your inter-document links.
Store array in one single file
If you activate this option, you can write all array members of the regarding attribute to one file. Otherwise, each value is written to it's own file, the files are numbered then. This only applies to multi valued attributes!
Dont extract DNs from attributes
There are attribute syntaxes which contains an object DN in the value, mixed together with other values which are sub-parts of the value. Especially in Novell eDirectory environments this is the case. LEX can extract such DNs from these attributes and can export only the DN to the separated value files. If you don't want this, deactivate this value.
Strip AOT header
This option applies only to Novell eDirectory environments. For a lot of attributes, Novell defined the values to be in the AOT file format. Sometimes such values are just simple strings, but they are preceded with an ugly AOT file header. LEX can strip of this header and export only the pure data to the export file.