projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e6e8398
)
SimpleExcel.php
author
Alan Knowles
<alan@roojs.com>
Mon, 27 Mar 2017 03:06:54 +0000
(11:06 +0800)
committer
Alan Knowles
<alan@roojs.com>
Mon, 27 Mar 2017 03:06:54 +0000
(11:06 +0800)
SimpleExcel.php
patch
|
blob
|
history
diff --git
a/SimpleExcel.php
b/SimpleExcel.php
index
65f126f
..
e07fa12
100644
(file)
--- a/
SimpleExcel.php
+++ b/
SimpleExcel.php
@@
-75,6
+75,7
@@
class Pman_Core_SimpleExcel extends Pman
var $workbook = false;
var $worksheet= false;
var $workbook = false;
var $worksheet= false;
+
function Pman_Core_SimpleExcel($data,$cfg)
{
// print_r($cfg);exit;
function Pman_Core_SimpleExcel($data,$cfg)
{
// print_r($cfg);exit;
@@
-92,11
+93,14
@@
class Pman_Core_SimpleExcel extends Pman
$cfg['formats'] = isset($cfg['formats']) ? $cfg['formats'] : array();
$cfg['formats'] = isset($cfg['formats']) ? $cfg['formats'] : array();
+ $this->formats['_default_date_format_'] = $workbook->addFormat();;
+ $this->formats['_default_date_format_']->setNumFormat('YYYY-MM-DD');
+
foreach($cfg['formats'] as $f=>$fcfg) {
$this->formats[$f] = & $workbook->addFormat();
foreach((array)$fcfg as $k=>$v) {
foreach($cfg['formats'] as $f=>$fcfg) {
$this->formats[$f] = & $workbook->addFormat();
foreach((array)$fcfg as $k=>$v) {
-
$this->formats[$f]->{'set' . $k}($v);
+ $this->formats[$f]->{'set' . $k}($v);
}
}
}
}