atishamte / piexl
PHP wrapper of phpexcel library
dev-master
2017-05-02 00:00 UTC
Requires
- php: >=5.6
- phpoffice/phpspreadsheet: dev-master
This package is not auto-updated.
Last update: 2025-02-02 03:23:41 UTC
README
Exporting PHP to Excel or Importing Excel to PHP. Excel Library for generate Excel File or for load Excel File.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist atishamte/piexl
OR
composer require atishamte/piexl
or add
"atishamte/piexl": "*"
to the require section of your composer.json
file.
Usage
Importing Data
Import file excel and return into an array.
<?php $config = [ 'fileNames' => 'SampleData.xlsx', // String or Array of file names 'setFirstRecordAsKeys' => true, // Set column keys as a index of each element 'setIndexSheetByName' => true, // Set worksheet name as a index of sheet data array 'getOnlySheet' => 'worksheetname', // Get data of particular worksheet 'getOnlySheetNames' => true, // Get only worksheet names as a array 'getSheetRangeInfo' => true, // Get range of filled cells in worksheets ]; $ExcelData = \atishamte\Piexl\Excel::import($config);