cognetif / report-generator
This package is abandoned and no longer maintained.
No replacement package was suggested.
Report Generator - Generate Excel, CSV, HTML Reports
v1.2.0
2021-04-15 14:47 UTC
Requires
- php: ^8.0
- phpoffice/phpspreadsheet: ^1.10
Requires (Dev)
- ext-fileinfo: *
- illuminate/support: ^6.10
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2024-02-26 14:51:30 UTC
README
This library allows you to easily create reports in XLSX, CSV, or HTML format.
Installation
Installation with composer:
$ compose require cognetif/report-generator
Usage
- Create or extend the
Cognetif\ReportGenerator\Report
. Report::setHeaders($headers = [])
function used to set the report headers.Report::addDataLine($line = [])
function used to add a single line of data to the report body.Report::addDataSet($dataSet = [])
function used to add the entire data set to the body.Report::makeCsv()
orReport::makeHtml()
orReport::makeExcel()
functions used to control what type to output.Report::generate()
to build and return the report.Report::clear()
to clear the body dataset from the report. Headers are maintained.Report::setMaxMbMemory(int $mb = 5)
to set the max number of megabytes used to generate a CSV report (Default: 5MB).Report::getDataSet()
get the entire dataset as an array. No headers.Report::maxDataColumns()
get the entire column count of the data set line with the most columns.
License
This library is protected under the MIT license. Please read the terms of the License.
Issues / Contributing
Contributions are welcome and encouraged. This library is open source but maintained by Cognetif.com. Please feel free to open an issue at: https://gitlab.com/cognetif-os/report-generator