motoronix/twig-spreadsheet-bundle

This Symfony bundle integrates PhpSpreadsheet into Symfony using Twig.

Installs: 2 987

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 46

Type:symfony-bundle

2.0 2020-10-27 11:58 UTC

This package is not auto-updated.

Last update: 2022-01-18 10:14:18 UTC


README

Teavis CI: Build Status Scrutinizer: Code Quality Code Coverage SensioLabsInsight: Code Quality

This Symfony bundle integrates PhpSpreadsheet into Symfony using Twig.

This repository is a continuation of the original TwigSpreadsheetBundle.

A list of differences from the original TwigSpreadsheetBundle:

  • added support for Symfony 5 and Twig 3
  • removed RequestListener.php
  • removed functional tests for controller functionality

Features

  • Easy to use Twig integration including macro and include support
  • Use existing spreadsheet files as templates. The easiest way to customize fonts, colors, etc.
  • ...

Supported output formats

The supported output formats are directly based on the capabilities of PhpSpreadsheet.

  • Open Document Format/OASIS (.ods)
  • Office Open XML (.xlsx) Excel 2007 and above
  • BIFF 8 (.xls) Excel 97 and above
  • CSV
  • PDF (using mPDF, which need to be installed separately)

Software requirements

The following software is required to use PhpSpreadsheet/TwigSpreadsheetBundle.

Required by this bundle:

  • PHP 7.0 or newer
  • Symfony 5.0 or newer
  • Twig 3.0 or newer

Required by PhpSpreadsheet:

  • PHP extension php_zip enabled
  • PHP extension php_xml enabled
  • PHP extension php_fileinfo enabled
  • PHP extension php_gd2 enabled (optional, but required for exact calculation of the column width)

Documentation

The source of the documentation is stored in the Resources/doc/ folder in this bundle:

Resources/doc/index.rst

You can find a prettier version on readthedocs.org:

https://twigspreadsheetbundle.readthedocs.org

Installation

All the installation instructions are located in the documentation.

License

This bundle is under the MIT license. See the complete license in the bundle:

Resources/meta/LICENSE