solve-x / export-tools
There is no license information available for the latest version (v0.1.4) of this package.
Export tools
v0.1.4
2017-09-11 12:58 UTC
Requires
- box/spout: ^2.7
Requires (Dev)
- mockery/mockery: ^0.9.9
- phpunit/phpunit: 5.2
This package is not auto-updated.
Last update: 2025-04-13 06:48:01 UTC
README
Fast MySQL-to-Excel exporter
This library uses MySQL's SELECT INTO OUTFILE
feature to export selected rows into a csv file
and then converts that csv into xlsx via a C-language program (Linux only). This is much faster than other pure PHP
solutions.
Example usage:
<?php use SolveX\ExportTools\ExcelExporter; $db = app('db'); // Illuminate\Database\ConnectionInterface (Laravel) $excelExporter = new ExcelExporter($db); $sql = "SELECT first_name, last_name, phone, email FROM `customers` WHERE id = 1"; $columns = ['First Name', 'Last Name', 'Phone', 'Email']; $path = $excelExporter->export($sql, $columns);