Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (26 sloc) 701 Bytes

插入链接

函数原型

insertUrl(int $row, int $column, string $url[, resource $formatHandler])

int $row

单元格所在行

int $column

单元格所在列

string $url

链接地址

resource $formatHandler

链接样式

示例

$excel = new \Vtiful\Kernel\Excel($config);

$urlFile = $excel->fileName("free.xlsx")
    ->header(['url']);

$fileHandle = $urlFile->getHandle();

$format   = new \Vtiful\Kernel\Format($fileHandle);
$urlStyle = $format->bold()
    ->underline(\Vtiful\Kernel\Format::UNDERLINE_SINGLE)
    ->toResource();

$urlFile->insertUrl(1, 0, 'https://github.com', $urlStyle);

$urlFile->output();
You can’t perform that action at this time.