These are chat archives for PHPOffice/PhpSpreadsheet

23rd
Dec 2017
Adrien Crivelli
@PowerKiKi
Dec 23 2017 04:00
image.png
@aramgevorgyan86 The following code:
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
$sheet->setCellValue('A1', 'foo bar baz');
$styleArray = [
    'alignment' => [
        'wrapText' => true,
        'textRotation' => 90,
        'vertical' => \PhpOffice\PhpSpreadsheet\Style\Alignment::VERTICAL_BOTTOM,
    ],
];
$sheet->getStyle('A1')->applyFromArray($styleArray);
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Xlsx($spreadsheet);
$writer->save('test.xlsx');