From: Edward Date: Mon, 18 Mar 2013 03:17:43 +0000 (+0800) Subject: ExcelToJson.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=8734125be87e3d50121f49295ef58fed89dce66a ExcelToJson.php --- diff --git a/ExcelToJson.php b/ExcelToJson.php index e14e1ab6..235cd692 100644 --- a/ExcelToJson.php +++ b/ExcelToJson.php @@ -60,17 +60,17 @@ class Pman_Core_ExcelToJson extends Pman_Roo $rows[$n[0]] = $n[1]; continue; } - print_r($n);exit; + if(!$cols){ $cols = array(); foreach($n as $k) { $cols[] = strtoupper(trim($k)); } - print_r($cols);exit; + if (empty($cols)) { continue; } - print_r($cols);exit; + foreach($req as $r) { if (!in_array($r,$cols)) { print_r($r); @@ -87,7 +87,7 @@ class Pman_Core_ExcelToJson extends Pman_Roo $rows[] = $row; } - exit; + if (empty($cols)) { $this->jerr("could not find a row with " . implode(' / ', $req)); }