質問編集履歴

1

コードを追加

2016/11/08 08:02

投稿

nanasan
nanasan

スコア10

test CHANGED
File without changes
test CHANGED
@@ -23,3 +23,29 @@
23
23
 
24
24
 
25
25
  環境:centos6、php7、PHPExcel1.8
26
+
27
+
28
+
29
+ ```PHP
30
+
31
+ // テンプレートを読み
32
+
33
+ $obj = PHPExcel_IOFactory::createReader('Excel2007');
34
+
35
+ $obj->setIncludeCharts(TRUE);
36
+
37
+ $book = $obj->load($excelTemplateName);
38
+
39
+
40
+
41
+ // ファイル保存
42
+
43
+ $filename = date('Ymd_His').'.xlsx';
44
+
45
+ $excelCreate = PHPExcel_IOFactory::createWriter($book, 'Excel2007');
46
+
47
+ $excelCreate->setIncludeCharts(TRUE);
48
+
49
+ $excelCreate->save(EXCEL_CREATE_PATH.$filename);
50
+
51
+ ```