Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alfa6661/eexcel
a Yii wrapper for PHPExcel Class
https://github.com/alfa6661/eexcel
Last synced: 25 days ago
JSON representation
a Yii wrapper for PHPExcel Class
- Host: GitHub
- URL: https://github.com/alfa6661/eexcel
- Owner: alfa6661
- Created: 2014-06-11T18:55:45.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-28T02:21:37.000Z (over 8 years ago)
- Last Synced: 2024-10-14T22:14:15.732Z (2 months ago)
- Language: PHP
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## EExcel - a Yii wrapper for PHPExcel Class
### Installation
1. Copy EExcel file to protected/components.
2. Download [PHPExcel](http://phpexcel.codeplex.com/releases/view/96183).
3. Create a phpexcel directory on protected/vendor.
4. In your protected/config/main.php, add the following :```php
//..
'components'=>array(
//..
'excel' => array(
'class' => 'EExcel'
),
//..
)
```### Usage
```php
public function actionTest()
{
$data = array(
array('Hello', 'World', '!!!'),
array('X', 'Y', 'Z')
);
$excel = Yii::app()->excel
->setTitle('Laporan', 'B1')
->setData($data, 'B3')
->setheaderFormat(array(
'font' => array(
'bold' => true
),
'fill' => array(
'color' => array('rgb' => 'FF0000')
)
))
->applyHeaderFormat('B3:D3')
->download('file.xlsx');
}
```### Save file to disk
```php
->save('/path/filename.xls');
```