This module provides a Word encoder for the Drupal 8 Serialization API. This enables the DOCX format to be used for data output (and potentially input, eventually). For example:
- Views can output DOCX data via a 'Word Export' display in a View.
- Module developers can leverage DOCX as a format when using the Serialization API.
-
Download and install PHPOffice/PHPWord. and all of it's dependencies:
- zendframework/zend-escaper 2.4.*
- zendframework/zend-stdlib 2.4.*
- zendframework/zend-validator 2.4.*
- zendframework/zend-stdlib 2.4.*
- phpoffice/common 0.2.6
- pclzip/pclzip": ^2.8
The preferred installation method is to use Composer.
-
The serialization module is required, so install that too.
-
Enable the
doc_serialization
module.
- Create a new view
- Add a Word Export display.
- Select 'docx' for the accepted request formats under
Format -> Word export -> Settings
. - Add desired fields to the view.
- Add a path, and optionally, a filename (pattern).
Unless otherwise stated all code is licensed under GNU GPL v3 and has the following copyright:
Copyright 2017, XSbyte
All rights reserved