函数原型

  1. gridline(int $option = \Vtiful\Kernel\Excel::GRIDLINES_SHOW_ALL): self

网格线类型

  1. const GRIDLINES_HIDE_ALL = 0; // 隐藏 屏幕网格线 和 打印网格线
  2. const GRIDLINES_SHOW_SCREEN = 1; // 显示屏幕网格线
  3. const GRIDLINES_SHOW_PRINT = 2; // 显示打印网格线
  4. const GRIDLINES_SHOW_ALL = 3; // 显示 屏幕网格线 和 打印网格线

实例

  1. $config = ['path' => './tests'];
  2. $excel = new \Vtiful\Kernel\Excel($config);
  3. $fileObject = $excel->fileName("tutorial01.xlsx");
  4. $fileObject->header(['name', 'age'])
  5. ->gridline(\Vtiful\Kernel\Excel::GRIDLINES_HIDE_ALL) // 设置工作表网格线
  6. ->data([
  7. ['viest', 21],
  8. ['viest', 22],
  9. ['viest', 23],
  10. ])
  11. ->output();