函数原型

  1. insertUrl(int $row, int $column, string $url[, string $text, string $toolTip, resource $formatHandler])

int $row

单元格所在行

int $column

单元格所在列

string $url

链接地址

string $text

链接文字

string $toolTip

链接提示

resource $formatHandler

链接样式

示例

  1. $excel = new \Vtiful\Kernel\Excel($config);
  2. $urlFile = $excel->fileName("free.xlsx")
  3. ->header(['url']);
  4. $fileHandle = $urlFile->getHandle();
  5. $format = new \Vtiful\Kernel\Format($fileHandle);
  6. $urlStyle = $format->bold()
  7. ->underline(\Vtiful\Kernel\Format::UNDERLINE_SINGLE)
  8. ->toResource();
  9. $urlFile->insertUrl(1, 0, 'https://github.com', NULL, NULL, $urlStyle);
  10. $urlFile->output();