2024 年日本 PHP 研討會

Vtiful\Kernel\Excel::setRow

(PECL xlswriter >= 1.2.1)

Vtiful\Kernel\Excel::setRow設定 Vtiful\Kernel\Excel 的列格式

說明

public Vtiful\Kernel\Excel::setRow(字串 $range, 浮點數 $height, 資源 $format = ?)

設定列的格式。

參數

range

儲存格起始和結束座標字串

height

列高

format

儲存格格式資源

回傳值

Vtiful\Kernel\Excel 實例

範例

範例 #1 setRow 範例

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

$excel = new \Vtiful\Kernel\Excel($config);
$excel->fileName('tutorial01.xlsx');

$format = new \Vtiful\Kernel\Format($excel->getHandle());
$boldStyle = $format->bold()->toResource();

$excel->header(['name', 'age'])
->
data([['viest', 21]])
->
setRow('A1', 20, $boldStyle)
->
output();
新增註解

使用者貢獻的註解

此頁面沒有使用者貢獻的註解。
To Top