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 +?>