fixed simplexls
This commit is contained in:
@@ -17,14 +17,12 @@ declare(strict_types=1);
|
|||||||
namespace siaupheng\fonia3\Data;
|
namespace siaupheng\fonia3\Data;
|
||||||
|
|
||||||
final class SimpleXLS {
|
final class SimpleXLS {
|
||||||
private $__tnamafile = null;
|
|
||||||
private $__wbook = null;
|
private $__wbook = null;
|
||||||
private $__atabel = [];
|
private $__atabel = [];
|
||||||
private $__aheader = [];
|
private $__aheader = [];
|
||||||
private $__avalue = [];
|
private $__avalue = [];
|
||||||
|
|
||||||
public function __construct($tnama_file="", $oprop=[]) {
|
public function __construct($oprop=[]) {
|
||||||
$this->__tnamafile = $tnama_file;
|
|
||||||
$this->__wbook = new \Shuchkin\SimpleXLSXGen();
|
$this->__wbook = new \Shuchkin\SimpleXLSXGen();
|
||||||
$this->__wbook
|
$this->__wbook
|
||||||
->setAuthor($_SESSION['__WEB_APP']['APP_NAME']." v".$_SESSION['__WEB_APP']['APP_VER'])
|
->setAuthor($_SESSION['__WEB_APP']['APP_NAME']." v".$_SESSION['__WEB_APP']['APP_VER'])
|
||||||
@@ -47,7 +45,7 @@ final class SimpleXLS {
|
|||||||
public function add_empty_row($nrow=1) {
|
public function add_empty_row($nrow=1) {
|
||||||
$_jkolom = count($this->__atabel);
|
$_jkolom = count($this->__atabel);
|
||||||
for ($i=0; $i<$nrow; $i++) {
|
for ($i=0; $i<$nrow; $i++) {
|
||||||
$this->__avalue[] = array_values(array_fill(0,$_jkolom,""));
|
$this->__avalue[] = array_fill(0,$_jkolom,"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,7 +60,7 @@ final class SimpleXLS {
|
|||||||
$_jkolom = count($this->__atabel);
|
$_jkolom = count($this->__atabel);
|
||||||
if ($_jkolom>0) $_jkolom--;
|
if ($_jkolom>0) $_jkolom--;
|
||||||
foreach ($this->__aheader as $_key => $_val) {
|
foreach ($this->__aheader as $_key => $_val) {
|
||||||
$this->__avalue[] = array_values(array_merge(["<b>".$_val."</b>"],array_fill(1,$_jkolom,null)));
|
$this->__avalue[] = array_merge(["<b>".$_val."</b>"],array_fill(1,$_jkolom,null));
|
||||||
}
|
}
|
||||||
if ($bw_header==true) $this->show_headers();
|
if ($bw_header==true) $this->show_headers();
|
||||||
}
|
}
|
||||||
@@ -84,9 +82,7 @@ final class SimpleXLS {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function add_stamp($ctk_ke=1, $bnama=false) {
|
public function add_stamp($ctk_ke=1, $bnama=false) {
|
||||||
$_jkolom = count($this->__atabel);
|
$this->__avalue[] = ["<i>".$_SESSION['__WEB_APP']['APP_NAME']."v".$_SESSION['__WEB_APP']['APP_VER'].date("\@ymd.His")."-".user_id(3).(($bnama==true)?"/".strtoupper(user_user()):"").(($ctk_ke>0)?"#".isi_nol($ctk_ke,2):"")."</i>"];
|
||||||
if ($_jkolom>0) $_jkolom--;
|
|
||||||
$this->__avalue[] = array_values(array_merge(["<i>".$_SESSION['__WEB_APP']['APP_NAME']."v".$_SESSION['__WEB_APP']['APP_VER'].date("\@ymd.His")."-".user_id(3).(($bnama==true)?"/".strtoupper(user_user()):"").(($ctk_ke>0)?"#".isi_nol($ctk_ke,2):"")."</i>"],array_fill(1,$_jkolom,null)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get_stamp($ctk_ke=1, $bnama=false) {
|
public function get_stamp($ctk_ke=1, $bnama=false) {
|
||||||
|
|||||||
Reference in New Issue
Block a user