質問編集履歴
1
コードを追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -10,4 +10,17 @@
|
|
10
10
|
|
11
11
|
http://blog.playispeace.com/1076/the_feature_that_isnt_enough_in_phpexcel_currently/
|
12
12
|
|
13
|
-
環境:centos6、php7、PHPExcel1.8
|
13
|
+
環境:centos6、php7、PHPExcel1.8
|
14
|
+
|
15
|
+
```PHP
|
16
|
+
// テンプレートを読み
|
17
|
+
$obj = PHPExcel_IOFactory::createReader('Excel2007');
|
18
|
+
$obj->setIncludeCharts(TRUE);
|
19
|
+
$book = $obj->load($excelTemplateName);
|
20
|
+
|
21
|
+
// ファイル保存
|
22
|
+
$filename = date('Ymd_His').'.xlsx';
|
23
|
+
$excelCreate = PHPExcel_IOFactory::createWriter($book, 'Excel2007');
|
24
|
+
$excelCreate->setIncludeCharts(TRUE);
|
25
|
+
$excelCreate->save(EXCEL_CREATE_PATH.$filename);
|
26
|
+
```
|