This is technical documentation for system integrators
This article presents some sample code from this file:
View file | ||
---|---|---|
|
Latest JAR File:
https://drive.google.com/file/d/1PBjiqItJ2jsI4v9BXNX1Eq8PQoo03l8A/view Open the table of contents of the samples via this URL: _plugins/LABS_EXAMPLE_EXPORTEXCEL/page/examples.jspz
Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
the integration of a simplified data export button to an Excel 2007 file in a datalist, not intended to be re-imported.
performing exports or imports of data to or from an Excel 2007 file
The Excel Import / Export can be used as a translation tool, to export and reimport strings that need to be exported by an external tool. you may use the dedicated plugin here:
https://drive.google.com/file/d/1PBjiqItJ2jsI4v9BXNX1Eq8PQoo03l8A/view
Plugin Configuration
tempdir
...
either the column title is tagged: the cell is named by the tag _fieldname followed by the field name
if the field does not exist the callback is called with the code UNKNOWN_FIELD (10).
during import, if the field corresponding to a column is not determinable, the callback is called
if no field tag is found, first the code NO_FIELD_NAMES (11)
then if there are columns that are not tagged, the code REMAINING_COLUMNS (8)
then for each column, the value in the cell is used as the field name
if no field corresponds, we call the callback with the code UNKNOWN_FIELD_IN_SHEET (12).
Import functionality by template
Problems during import, errors, conflicts, disputes: understanding how we report “issues”.
Introduction
When a problem occurs during the import, an exception is raised. It is possible to intercept this exception in order to indicate to the import process an alternative to solve the problem. This allows:
...
the value -4 (EXCEPTION) indicates that the planned exception is raised. The process then stops, except in diehard simulation mode, where the process will continue as much as it can;
the value -3 (STOP) indicates that the process is stopped without raising the exception
the value 4 (SKIP_ROW) indicates that the import of the current object instance is cancelled
the value 5 (SKIP_SHEET) indicates that the import of the current object (of all instances of the object) is cancelled
the value 3 (SKIP_COLUMN) indicates that the import of the current field is cancelled
the value 2 (CHANGE_VALUE) indicates that a replacement value is proposed for a problematic value, or a lack of mandatory value, or any hindrance. If the proposed value continues to cause trouble, the original exception will be raised.
the value 1 (DEFAULT) allows to select a default automatic operation
any other value corresponds to a default behavior depending on the issue. Generally, it is EXCEPTION or DEFAULT.
List of issues
NO_METADATA_LOCALE
Use the API in your own plug-in