2024 年日本 PHP 研討會

Vtiful\Kernel\Excel::data

(PECL xlswriter >= 1.2.1)

Vtiful\Kernel\Excel::dataVtiful\Kernel\Excel 資料

說明

public Vtiful\Kernel\Excel::data(陣列 $data)

將資料寫入工作表中。

參數

data

工作表資料

回傳值

Vtiful\Kernel\Excel 實例

範例

範例 #1 範例

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

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

$file = $fileObject->fileName('tutorial.xlsx', 'sheet_one')
->
header(['name', 'age'])
->
data([
[
'viest', 23],
[
'wjx', 23],
]);
?>
新增註記

使用者貢獻的註記

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