ExcelToJson.php
[Pman.Core] / ExcelToJson.php
index bfa51d5..235cd69 100644 (file)
@@ -53,6 +53,7 @@ class Pman_Core_ExcelToJson extends Pman_Roo
         while(false !== ($n = fgetcsv($fh,10000, ',', '"'))) {
             if(!array_filter($n)){
                 $header = true;
+                continue;
             }
             
             if(!$header){
@@ -65,10 +66,11 @@ class Pman_Core_ExcelToJson extends Pman_Roo
                 foreach($n as $k) {
                     $cols[] = strtoupper(trim($k));
                 }
-
+            
                 if (empty($cols)) {
                     continue;
                 }
+               
                 foreach($req as $r) {
                     if (!in_array($r,$cols)) {
                         print_r($r);
@@ -85,7 +87,7 @@ class Pman_Core_ExcelToJson extends Pman_Roo
             $rows[] = $row;
             
         }
-        print_r($cols);exit;
+        
         if (empty($cols)) {
             $this->jerr("could not find a row with " . implode(' / ', $req));
         }