php8.5
Home/ Manual/ xlswriter / xlsx-kernel/ Vtiful\Kernel\Excel::header

Vtiful\Kernel\Excel::header

PHP function Edit on GitHub ✎

(PECL xlswriter >= 1.2.1)

Vtiful\Kernel\Excel header

Description

Vtiful\Kernel\Excel::header(array $headerData)

Write a header in the worksheet.

Parameters

headerData

worksheet header data

Return Values

Vtiful\Kernel\Excel instance

Examples

example

php
<?php
$config = [
    'path' => './tests'
];

$fileObject  = new \Vtiful\Kernel\Excel($config);

$file = $fileObject->fileName('tutorial.xlsx', 'sheet_one')
    ->header(['name', 'age']);
?>

Source: reference/xlswriter/xlsx-kernel/header.xml · from the official PHP manual (php/doc-en)