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