reference/xlswriter/xlsx-format/underline.xml
547a556ea0ffcae65a07fba5eac97f6f5c4faf2c
...
...
@@ -51,7 +51,7 @@
51
51
<refsect1 role="examples">
52
52
&reftitle.examples;
53
53
<example>
54
-
<title>example</title>
54
+
<title>Underline style example</title>
55
55
<programlisting role="php">
56
56
<![CDATA[
57
57
<?php
...
...
@@ -59,14 +59,13 @@ $config = [
59
59
'path' => './tests'
60
60
];
61
61

62
-
$excel = new \Vtiful\Kernel\Excel($config);
62
+
$excel = new \Vtiful\Kernel\Excel($config);
63
+
$excel->fileName('tutorial01.xlsx');
63
64

64
-
$fileObject = $excel->fileName('tutorial01.xlsx');
65
-
$fileHandle = $fileObject->getHandle();
65
+
$format = new \Vtiful\Kernel\Format($excel->getHandle());
66
+
$underlineStyle = $format->underline(\Vtiful\Kernel\Format::UNDERLINE_SINGLE)->toResource();
66
67

67
-
$underlineStyle = \Vtiful\Kernel\Format::underline($fileHandle, \Vtiful\Kernel\Format::UNDERLINE_SINGLE);
68
-

69
-
$fileObject->header(['name', 'age'])
68
+
$excel->header(['name', 'age'])
70
69
->data([['viest', 21]])
71
70
->setColumn('A:A', 200, $underlineStyle)
72
71
->output();
73
72