Source

YiiReport / README.md

Full commit

YiiExcel

Yii extension for export Spreadsheet and PDF from scratch or templates using PHPExcel and PHPReport Libraries.

Requirements

  • Yii 1.1 or above
  • PHPExcel 1.7.8
  • YiiExcel extension
  • Optional: TcPDF, DomPDF or mPDF library.

Installation

  1. Download and install YiiExcel extension.
  2. Downslad a PDF library, like mPDF and copy to protected/vendors directory
  3. Download and Unzip YiiReport, then copy yiiexcel directory to protected/extensions.
  4. Edit yiireport.php config file if you need.
  5. Add YiiReport to imports:
[php]
    ...
    'import'=>array(
        ...
        'application.vendors.phpexcel.PHPExcel',
        'ext.yiireport.*',
        ...
    ),

Usage

Just create a PHPExcel instance:

$objPHPExcel = new PHPExcel();

Read the SiteController.php example file located inside example directory.