Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

phpspreadsheet applyFromArray wrap

 $styleArray = [
            'borders'   => [
                'allBorders' => [
                    'borderStyle' => Border::BORDER_THIN,
                ],
            ],
            'alignment' => [
                'wrapText' => true,
            ],
        ];

 $sheet->setCellValue('A1', 'product_name')->getStyle('A1')->applyFromArray($styleArray);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #phpspreadsheet #applyFromArray #wrap
ADD COMMENT
Topic
Name
5+8 =