protected function Xls::setHeaderRowItalic in Excel Serialization 8
Set font of the header (first) row to italic.
Parameters
\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $sheet: The worksheet to set the font of the header row to italic.
1 call to Xls::setHeaderRowItalic()
- Xls::encode in src/
Encoder/ Xls.php - Encodes data into the given format.
File
- src/
Encoder/ Xls.php, line 366
Class
- Xls
- Adds XLS encoder support for the Serialization API.
Namespace
Drupal\xls_serialization\EncoderCode
protected function setHeaderRowItalic(Worksheet $sheet) {
$sheet
->getStyle('A1:' . $sheet
->getHighestDataColumn() . '1')
->getFont()
->setItalic(TRUE);
}