PHPackages                             tothbarnabas79/cake-excel - 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. tothbarnabas79/cake-excel

ActiveCakephp-plugin[PDF &amp; Document Generation](/categories/documents)

tothbarnabas79/cake-excel
=========================

CakePHP excel generator

v1.3(7y ago)087MITPHPPHP &gt;=5.6.0

Since Feb 20Pushed 7y agoCompare

[ Source](https://github.com/tothbarnabas79/cake-excel)[ Packagist](https://packagist.org/packages/tothbarnabas79/cake-excel)[ RSS](/packages/tothbarnabas79-cake-excel/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (3)Versions (3)Used By (0)

[![Build Status](https://camo.githubusercontent.com/3ca13388fc549348e7113679f28b8c5c646a40720da98beb5bdb77335a049341/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f64616b6f74612f43616b65457863656c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/dakota/CakeExcel)[![Coverage Status](https://camo.githubusercontent.com/d8d34427cafd634dde5d5a901c76f1523869826e68b1761d4ea06ae11589a1dd/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f64616b6f74612f43616b65457863656c2e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/dakota/CakeExcel?branch=master)[![Total Downloads](https://camo.githubusercontent.com/62bfc2d2d750fe4dd443bcf578c8442afb4ff4003ae7b7f25e93bdd9f2f8aa9e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64616b6f74612f63616b652d657863656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dakota/cake-excel)[![Latest Stable Version](https://camo.githubusercontent.com/ad89c8f71cad8d2007b1bdf19c610990c24bfce495dbbe42f70bf72cb91b2899/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64616b6f74612f63616b652d657863656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dakota/cake-excel)

CakeExcel
=========

[](#cakeexcel)

A plugin to generate Excel files with CakePHP.

Requirements
------------

[](#requirements)

- CakePHP 3.6
- PHP 5.6.0 or greater
- Patience

Installation
------------

[](#installation)

*\[Using [Composer](http://getcomposer.org/)\]*

```
composer require tothbarnabas79/cake-excel

```

### Enable plugin

[](#enable-plugin)

Load the plugin in your app's `config/bootstrap.php` file:

```
Plugin::load('CakeExcel', ['bootstrap' => true, 'routes' => true]);

```

Usage
-----

[](#usage)

First, you'll want to setup extension parsing for the `xlsx` extension. To do so, you will need to add the following to your `config/routes.php` file:

```
# Set this before you specify any routes
Router::extensions('xlsx');
```

Next, we'll need to add a viewClassMap entry to your Controller. You can place the following in your AppController:

```
public $components = [
    'RequestHandler' => [
        'viewClassMap' => [
            'xlsx' => 'CakeExcel.Excel',
        ],
    ]
];
```

Each application *must* have an xlsx layout. The following is a barebones layout that can be placed in `src/Template/Layout/xlsx/default.ctp`:

```
