Create file
If there is a file with the same name under the path, the new file will overwrite the old file.
1
$config = ['path' => '/home/viest'];
2
$excel = new \Vtiful\Kernel\Excel($config);
3
4
// fileName will automatically create a worksheet,
5
// you can customize the worksheet name, the worksheet name is optional
6
$filePath = $excel->fileName('tutorial01.xlsx', 'sheet1')
7
->header(['Item', 'Cost'])
8
->data([
9
['Rent', 1000],
10
['Gas', 100],
11
['Food', 300],
12
['Gym', 50],
13
])
14
->output();
Copied!
Last modified 2yr ago
Copy link