row-bloom / spreadsheet-data-loader
row-bloom Spreadsheet data loader driver
v0.2.0
2024-01-01 15:54 UTC
Requires
- php: ^8.1
- phpoffice/phpspreadsheet: ^1.28
README
Important
This is a sub-split, for development, pull requests and issues, visit: https://github.com/row-bloom/row-bloom
Installation
composer require row-bloom/spreadsheet-data-loader
use RowBloom\RowBloom\Support; use RowBloom\SpreadsheetDataLoader\SpreadsheetDataLoader; app()->make(Support::class) ->registerDataLoaderDriver(SpreadsheetDataLoader::NAME, SpreadsheetDataLoader::class);
Requires:
- PHP >= 8.1
phpoffice/phpspreadsheet
dependencies:
- ext-ctype
- ext-dom
- ext-fileinfo
- ext-gd
- ext-iconv
- ext-libxml
- ext-mbstring
- ext-simplexml
- ext-xml
- ext-xmlreader
- ext-xmlwriter
- ext-zip
- ext-zlib
Usage
use RowBloom\SpreadsheetDataLoader\SpreadsheetDataLoader; use RowBloom\RowBloom\Interpolators\PhpInterpolator; use RowBloom\RowBloom\Renderers\HtmlRenderer; use RowBloom\RowBloom\RowBloom; app()->get(RowBloom::class) ->addTablePath('foo.csv') ->addTablePath('bar.xlsx') ->setInterpolator(PhpInterpolator::NAME) ->setTemplate(' <h1>{{ title }}</h1> <p>Bold text</p> <div>{{ body }}</div> ') ->setRenderer(HtmlRenderer::class) ->save(__DIR__.'/foo.pdf');
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information.