12345678910111213141516171819202122232425262728293031 |
- --TEST--
- Check for vtiful presence
- --SKIPIF--
- <?php if (!extension_loaded("xlswriter")) print "skip"; ?>
- --FILE--
- <?php
- $config = ['path' => './tests'];
- $excel = new \Vtiful\Kernel\Excel($config);
- $fileObject = $excel->fileName('tutorial01.xlsx');
- $fileHandle = $fileObject->getHandle();
- $boldStyle = \Vtiful\Kernel\Format::bold($fileHandle);
- $filePath = $fileObject->header(['name', 'age'])
- ->data([
- ['viest', 21],
- ['wjx', 21]
- ])
- ->setRow('A1', 200, $boldStyle)
- ->setRow('A2:A3', 200, $boldStyle)
- ->output();
- var_dump($filePath);
- ?>
- --CLEAN--
- <?php
- @unlink(__DIR__ . '/tutorial01.xlsx');
- ?>
- --EXPECT--
- string(23) "./tests/tutorial01.xlsx"
|