PHPackages                             heimrichhannot/contao-exporter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. heimrichhannot/contao-exporter

ActiveContao-module[PDF &amp; Document Generation](/categories/documents)

heimrichhannot/contao-exporter
==============================

A backend module for exporting any contao entity to file.

4.2.5(7y ago)11.3k[2 issues](https://github.com/heimrichhannot/contao-exporter/issues)1LGPL-3.0+PHPPHP ~5.4 || ~7.0

Since Nov 13Pushed 7y ago4 watchersCompare

[ Source](https://github.com/heimrichhannot/contao-exporter)[ Packagist](https://packagist.org/packages/heimrichhannot/contao-exporter)[ Docs](https://github.com/heimrichhannot/contao-exporter)[ RSS](/packages/heimrichhannot-contao-exporter/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (5)Versions (62)Used By (1)

Exporter
========

[](#exporter)

A module for exporting any contao entity.

[![alt myModulePreview](docs/screenshot.png)](docs/screenshot.png)

*Export config preview*

Features
--------

[](#features)

- export an entity list in the backend
- export of entities in the frontend
- currently supported file types:
    - csv
    - xls
    - pdf
    - zip (media file export as zip)

### Classes

[](#classes)

NameDescriptionCsvExporterAn exporter for writing entity instances into a CSV fileXlsExporterAn exporter for writing entity instances into an excel file (XLS)MediaExporterAn exporter that combines all files referenced by the selected properties of an entity in one archive file (e.g. zip) preserving the folder structurePdfExporterAn exporter for creating a pdf out of an entity### Hooks

[](#hooks)

NameArgumentsExpected return valueDescriptionexporter\_modifyHeaderFields$arrFields, $objExporter$arrFieldsModify the header fields just before just before being written to fileexporter\_modifyMediaFilename$objFile, $strFieldname, $varFieldValue, $objMediaExporter$objFile-&gt;pathModify a filename just before added to the archive when using *MediaExporter* (also folder structure could be modified here)exporter\_modifyFilename$strFilename, $objExporter$strFilenameModify the export filenameexporter\_modifyFilePath$strFilePath, $objExporter$strFilePathModify the export file pathexporter\_modifyFieldValue$varValue, $strField, $arrRow, $intCol$varValueModify the field values. Only available in PhpExcelExporterTechnical instruction
---------------------

[](#technical-instruction)

### Backend export

[](#backend-export)

### Step 1

[](#step-1)

Define your global operation in your entity's dca as follows:

```
'global_operations' => array
(
    'export_csv' => \HeimrichHannot\Exporter\ModuleExporter::getGlobalOperation('export_csv',
                 $GLOBALS['TL_LANG']['MSC']['export_csv'],
                 'system/modules/exporter/assets/img/icon_export.png')
),

```

### Step 2

[](#step-2)

Add your backend module in your entity's config.php as follows:

```
$GLOBALS['BE_MOD']['mygroup'] = array
(
    'export_csv' => \HeimrichHannot\Exporter\ModuleExporter::getBackendModule()
),

```

### Step 3

[](#step-3)

Create a configuration for your export by using the exporter's backend module (group devtools).

Frontend
--------

[](#frontend)

You can use [frontendedit](https://github.com/heimrichhannot/contao-frontendedit) or [formhybrid\_list](https://github.com/heimrichhannot/contao-formhybrid_list) in order to easily create a module for manipulating your entities in the frontend. It already contains a function to export entities after submission!

### Step 1

[](#step-1-1)

Create a configuration for your export by using the exporter's backend module (group devtools).

### Step 2

[](#step-2-1)

Add the following code to your module in order to your module:

```
ModuleExporter::export($objConfig, $objEntity, $arrFields);

```

If you add `$arrFields`, this array will be iteratd automatically in your template. Alternatively you can print every entity's property using $this in the template.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~17 days

Recently: every ~39 days

Total

61

Last Release

2799d ago

Major Versions

1.0.18 → 2.0.02016-05-23

2.2.6 → 3.0.02016-11-21

3.0.10 → 4.0.02017-03-17

PHP version history (2 changes)3.0.7PHP ~5.6 || ^7.0

4.0.5PHP ~5.4 || ~7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/28ad3224d8727b622ebd229840eea6b9dbcb83eb0bd609e6ce65b614830ff538?d=identicon)[digitales@heimrich-hannot.de](/maintainers/digitales@heimrich-hannot.de)

---

Top Contributors

[![nafetagrats](https://avatars.githubusercontent.com/u/5796948?v=4)](https://github.com/nafetagrats "nafetagrats (4 commits)")[![koertho](https://avatars.githubusercontent.com/u/12064642?v=4)](https://github.com/koertho "koertho (1 commits)")

---

Tags

exportxlscsvmodulecontaobackenddeveloper

### Embed Badge

![Health badge](/badges/heimrichhannot-contao-exporter/health.svg)

```
[![Health](https://phpackages.com/badges/heimrichhannot-contao-exporter/health.svg)](https://phpackages.com/packages/heimrichhannot-contao-exporter)
```

###  Alternatives

[sonata-project/exporter

Lightweight Exporter library

44920.9M35](/packages/sonata-project-exporter)[kartik-v/yii2-export

A library to export server/db data in various formats (e.g. excel, html, pdf, csv etc.)

1623.1M35](/packages/kartik-v-yii2-export)[shuchkin/simplecsv

Parse and retrieve data from CSV files. Export data to CSV.

5192.4k](/packages/shuchkin-simplecsv)[phpnt/yii2-export

Yii2 It saves data in xls, csv, word, html, pdf files.

158.9k](/packages/phpnt-yii2-export)[ikkez/f3-sheet

Some Excel and CSV utilities for PHP Fat-Free Framework

1314.5k](/packages/ikkez-f3-sheet)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
