8 Commits

Author SHA1 Message Date
Lucian Sirbu
488bc371a5 Added support for mergeCells, cell height, shrink to fit
Added support for
    mergeCells:
        // mergeCells (B2:G2), you may use CellHelper::getColumnLettersFromColumnIndex() to convert from "B2" to "[1,2]"
	    $writer->mergeCells([1,2], [6, 2]);

    cell height:
        $row->setHeight(30);

    shouldShrinkToFit:
        $style->setShouldShrinkToFit();

These changes are implemented for XLSX as that's what I need and test spout on.
2020-05-04 16:48:18 +03:00
Adrien Loison
9f4c094fa0 Cell alignment
This PR adds support for cell alignment for XLSX and ODS files.
You can now align the content of the cells this way:
```
use Box\Spout\Common\Entity\Style\CellAlignment;
use Box\Spout\Writer\Common\Creator\Style\StyleBuilder;

$style = (new StyleBuilder())
    ->setCellAlignment(CellAlignment::RIGHT)
    ->build();
...
```

Possible cell alignments are: LEFT, RIGHT, CENTER and JUSTIFY.
2019-10-27 18:58:56 +01:00
Alexander Rakushin
e8c6d83104 сode formatting (CS Fixer) 2019-10-01 20:08:54 +00:00
Alexander Rakushin
40aecd7b90 Added support for cell formats when writing Excel files 2019-10-01 20:08:54 +00:00
Adrien Loison
f5168114d0 Merge Reader and Writer entities
Merged Cell/Row/Style entities
2017-11-19 02:54:17 +01:00
Adrien Loison
727a90fd06 Remove @api annotation 2017-11-05 02:23:26 +01:00
Adrien Loison
b968513cb9 Fix code style 2017-09-06 00:33:43 +02:00
Adrien Loison
238756ab6e Move Style classes into Common folder (#432) 2017-05-30 00:56:50 +02:00