https://github.com/pmvc-plugin/excel
https://github.com/pmvc-plugin/excel
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/pmvc-plugin/excel
- Owner: pmvc-plugin
- Created: 2015-08-17T13:28:27.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-12-27T03:37:52.000Z (over 6 years ago)
- Last Synced: 2025-07-30T05:23:32.958Z (10 months ago)
- Language: PHP
- Size: 48.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://packagist.org/packages/pmvc-plugin/excel)
[](https://packagist.org/packages/pmvc-plugin/excel)
[](https://travis-ci.org/pmvc-plugin/excel)
[](https://packagist.org/packages/pmvc-plugin/excel)
[](https://packagist.org/packages/pmvc-plugin/excel)
Excel Library (for now write only)
===============
* Fork from https://github.com/mk-j/PHP_XLSXWriter
* Replace with pclzip don't need compile ZipArchive in this version
* http://php.net/manual/en/zip.installation.php
## Office Open XML File Formats
* https://msdn.microsoft.com/en-us/library/aa338205(v=office.12).aspx
* https://en.wikipedia.org/wiki/Office_Open_XML_file_formats
## How to use?
```
include_once('vendor/autoload.php');
PMVC\Load::plug();
$data = array(
array('year','month','amount'),
array('2003','1','220'),
array('2003','2','153.5'),
);
$writer = \PMVC\plug('excel')->create();
$writer->writeSheet($data);
$writer->writeToFile('output.xlsx');
```
## Install with Composer
### 1. Download composer
* mkdir test_folder
* curl -sS https://getcomposer.org/installer | php
### 2. Install by composer.json or use command-line directly
#### 2.1 Install by composer.json
* vim composer.json
```
{
"require": {
"pmvc-plugin/excel": "dev-master"
}
}
```
* php composer.phar install
#### 2.2 Or use composer command-line
* php composer.phar require pmvc-plugin/excel