Back
exportLens
Editing, Updating and Creating Records
exportLens
List of fields to export as Excel file or CSV when they click on the export button
Default:
List of fields to export as CSV or as an Excel file. All carriage returns are converted to spaces.

The files generated need to be stored in a temporary directory before they are downloaded. Set the temporary directory using the imageTmpDir property.

Excel files are generated using the LGPL class, SimpleXlsGen, which can be found in phplens-excel.inc.php. We conform to Microsoft Excel 5.0 File Format. They are exported by default with the .xls extension.

For CSV, all text fields are quoted with double-quotes, and double-quotes are escaped with double-quotes, following Microsoft Excel CSV conventions. CSV files generated are by default exported with the .csv extension.

The source code for the exporting can be found in phplens-template.inc.php. You can also modify the mime types used from this file. The actual file downloading to your web browser is performed by a helper script, phplens-img.php.

Also see the exportOptions property to change the defaults, or change the file name to use for exports.

Microsoft Excel is a copyrighted product of Microsoft Corporation.

Syntax
$lens->exportLens = 'ProductName;Supplier;UnitPrice';

 Basic:Yes  Advanced/Enterprise:Yes  DynamicEdit:Yes   [Version 2.2]