浏览代码

Test: read skip empty value

viest 5 年之前
父节点
当前提交
b935a65efc
共有 1 个文件被更改,包括 21 次插入0 次删除
  1. 21 0
      tests/open_xlsx_get_data_skip_empty.phpt

+ 21 - 0
tests/open_xlsx_get_data_skip_empty.phpt

@@ -33,6 +33,12 @@ $data = $excel->openFile('tutorial.xlsx')
     ->openSheet('Sheet1', \Vtiful\Kernel\Excel::SKIP_EMPTY_CELLS|\Vtiful\Kernel\Excel::SKIP_EMPTY_ROW)
     ->getSheetData();
 
+var_dump($data);
+
+$data = $excel->openFile('tutorial.xlsx')
+    ->openSheet('Sheet1', \Vtiful\Kernel\Excel::SKIP_EMPTY_VALUE)
+    ->getSheetData();
+
 var_dump($data);
 ?>
 --CLEAN--
@@ -82,4 +88,19 @@ array(2) {
     [0]=>
     string(5) "viest"
   }
+}
+array(3) {
+  [0]=>
+  array(1) {
+    [1]=>
+    string(4) "Cost"
+  }
+  [1]=>
+  array(0) {
+  }
+  [2]=>
+  array(1) {
+    [0]=>
+    string(5) "viest"
+  }
 }