PHP code example of qcjackman / excelreader
1. Go to this page and download the library: Download qcjackman/excelreader library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
qcjackman / excelreader example snippets
php artisan vendor:publish --provider="Qcjackman\Excelreader\Provider\ExcelReaderServiceProvider"
$file = $request->file('file');
try {
$reader = new \Qcjackman\Excelreader\Reader\Reader('example', 1);
$result = $reader->setFile($file)->toArray('first', 2);
// dd($result);
} catch(\Exception $e) {
return api_result_self(-1, false, 'import failed! '.$e->getMessage());
}