- Add support for openspout/openspout v4
- Drop support for openspout/openspout v3
- Add type hinting
- Removed
useDelimiter
on SimpleExcelWriter - Removed
headerRowFormatter
on SimpleExcelReader
\Box\Spout\Common\Entity\Row
should be replaced with\OpenSpout\Common\Entity\Row
\Box\Spout\Common\Entity\Style\Style
should be replaced withOpenSpout\Common\Entity\Style\Style
In v3 there was a method to set a delimiter. Now you should pass this as parameter to the constructor.
Change
$reader = SimpleExcelWriter::create($file)->useDelimiter(';');
To
$writer = SimpleExcelWriter::create(file: $file, delimiter: ';');
In OpenSpout v4 the StyleBuilder
is removed and integrated inside the Style
class.
Update code like this...
use OpenSpout\Common\Entity\Style\Style;
use OpenSpout\Writer\Common\Creator\Style\StyleBuilder;
$builder = new StyleBuilder();
$builder
->setFontBold()
->setFontName('Sans');
... to ...
use OpenSpout\Common\Entity\Style\Style;
$style = new Style();
$style
->setFontBold()
->setFontName('Sans');
In v4 of openspout/openspout it is no longer possible to explicitly set the type. We still have support for this, but we'll deprecate the method.
$reader = SimpleExcelReader::create('php://input', 'csv');
$writer = SimpleExcelWriter::create('php://output', 'csv');