(PECL xlswriter >= 1.2.1)
Vtiful\Kernel\Excel::insertText — Vtiful\Kernel\Excel insertText
$row
,$column
,$data
,$format
= ?在儲存格中寫入文字。
列 (row)
儲存格列數
欄 (column)
儲存格欄數
資料 (data)
要寫入的資料
格式 (format)
字串格式
範例 #1
<?php
$config = [
'path' => './tests'
];
$excel = new \Vtiful\Kernel\Excel($config);
$file = $excel->fileName("free.xlsx")
->header(['name', 'money']);
for ($index = 0; $index < 10; $index++) {
$file->insertText($index+1, 0, 'viest');
$file->insertText($index+1, 1, 10000, '#,##0');
}
$textFile->output();