reference/xlswriter/xlsx-kernel/set-column.xml
547a556ea0ffcae65a07fba5eac97f6f5c4faf2c
...
...
@@ -60,7 +60,7 @@
60
60
<refsect1 role="examples">
61
61
&reftitle.examples;
62
62
<example>
63
-
<title>example</title>
63
+
<title>setColumn example</title>
64
64
<programlisting role="php">
65
65
<![CDATA[
66
66
<?php
...
...
@@ -68,14 +68,13 @@ $config = [
68
68
'path' => './tests'
69
69
];
70
70

71
-
$excel = new \Vtiful\Kernel\Excel($config);
71
+
$excel = new \Vtiful\Kernel\Excel($config);
72
+
$excel->fileName('tutorial01.xlsx');
72
73

73
-
$fileObject = $excel->fileName('tutorial01.xlsx');
74
-
$fileHandle = $fileObject->getHandle();
74
+
$format = new \Vtiful\Kernel\Format($excel->getHandle());
75
+
$boldStyle = $format->bold()->toResource();
75
76

76
-
$boldStyle = \Vtiful\Kernel\Format::bold($fileHandle);
77
-

78
-
$fileObject->header(['name', 'age'])
77
+
$excel->header(['name', 'age'])
79
78
->data([['viest', 21]])
80
79
->setColumn('A:A', 200, $boldStyle)
81
80
->output();
82
81