初始化PHP-Xlswrite扩展
This commit is contained in:
19
excel.php
Normal file
19
excel.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
$config = ['path' => './tests/'];
|
||||
$excel = new \Vtiful\Kernel\Excel($config);
|
||||
$fileFd = $excel->fileName('tutorial01.xlsx');
|
||||
var_dump($fileFd);
|
||||
$setHeader = $fileFd->header(['Item', 'Cost']);
|
||||
var_dump($setHeader);
|
||||
$setData = $setHeader->data([
|
||||
['Rent', 1000],
|
||||
['Gas', 100],
|
||||
['Food', 300],
|
||||
['Gym', 50],
|
||||
|
||||
]);
|
||||
var_dump($setData);
|
||||
$output = $setData->output();
|
||||
var_dump($output);
|
||||
?>
|
||||
|
Reference in New Issue
Block a user