Excel Serialization
12,850 sites
Security covered
This module allows Drupal to export data in Excel (.xls) format using the core Serialization API. This enables integration with other Drupal features like REST exports and Views to output data that can be easily opened and manipulated in spreadsheet software.
This module provides an Excel encoder for the Drupal 8 Serialization API. This
enables the XLS format to be used for data output (and potentially input,
eventually). For example:
- Drupal 8's REST module can return data in XLS format.
- Views can output XLS data via a 'REST Export' view, or a
Data Export view. - Module developers can leverage XLS as a format when using the Serialization
API.
Installation
- Download and install PHPOffice/PhpSpreadsheet. The suggested installation method is to use Composer.
- Enable the
xls_serializationmodule.
Creating an XLS view
- Create a new view
- Add a Data Export display (this assumes the use of the Views Data Export) module. Otherwise add a REST Export view.
- Check only 'xls' for the accepted request formats under
Format > Data export > Settings. - Add desired fields to the view.
- Add a path, and optionally, a filename pattern.
Related modules
- The Views Data Export Excel module extends the DataExport Views style and display classes from the Views Data Export module using the serializer provided by this module.