Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arif-rh/easy-excel
Wrapper for Easy Simple Using PHPSpreadsheet
https://github.com/arif-rh/easy-excel
Last synced: 8 days ago
JSON representation
Wrapper for Easy Simple Using PHPSpreadsheet
- Host: GitHub
- URL: https://github.com/arif-rh/easy-excel
- Owner: arif-rh
- License: mit
- Created: 2020-03-17T08:11:48.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-17T09:29:04.000Z (almost 5 years ago)
- Last Synced: 2024-11-08T13:09:33.747Z (2 months ago)
- Language: PHP
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**Install**
````
composer require arif-rh/easy-excel
````**Example**
````
require "vendor/autoload.php";$xls = new Arifrh\EasyExcel\EasyExcel('Example 1');
$xls->setColumnsWidth([
'A' => 20, 'B' => 90
]);$xls
// merge cells with background color
->setColumnHeader('A1', 'B1', 'UTF-8 Support オートライブラリー', '90adf0')// set one cel
->setCellValue('A2', 'Easy Excel')// set multiple celss
->setCellValues([
'B2' => 'Wrapper of PHPSpreadsheet',
'B3' => 'Easy for simple use case'
])// set cell with background color
->setLabel('A4', 'Github Repository', 'e39054')// set cell with hyperlink
->setLinkValue('B4', 'https://github.com/arif-rh/easy-excel', 'Go to Github Repository')
// clone sheet
->cloneSheet('Example 1', 'Copy of Example 1')
// or use name "Copy of Example 1"
->setActiveSheet(1)
// insert 8 rows before row 1
->insertRows(8, 1)// add image to cell
->setImageValue('A1', './img/avatar.png')// set merge cells
->setMergeCellsValue('B1', 'B7', 'composer require arif-rh/easy-excel', ['HC', 'VC'])// download file, or add second parameter with 'pdf' to download as PDF
->forceDownload('Easy-Excel');
````