From daa21045b3cd342263797503c6a47fb199c36c98 Mon Sep 17 00:00:00 2001 From: Salesman Date: Tue, 10 Sep 2019 10:12:46 +0500 Subject: [PATCH] Update excel_reader2.php Added missing function dumptoarray() --- php-excel-reader/excel_reader2.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/php-excel-reader/excel_reader2.php b/php-excel-reader/excel_reader2.php index 75351b7..efaeec2 100644 --- a/php-excel-reader/excel_reader2.php +++ b/php-excel-reader/excel_reader2.php @@ -648,6 +648,16 @@ function dump($row_numbers=false,$col_letters=false,$sheet=0,$table_class='excel return $out; } + function dumptoarray($sheet=0) { + $arr = array(); + + for($row=1;$row<=$this->rowcount($sheet);$row++) + for($col=1;$col<=$this->colcount($sheet);$col++) + $arr[$row][$col] = $this->val($row,$col,$sheet); + + return $arr; + } + // -------------- // END PUBLIC API @@ -1734,4 +1744,4 @@ function _GetInt4d($data, $pos) { } -?> \ No newline at end of file +?>