插入批注
Last updated
$config = [
'path' => './tests'
];
$excel = new \Vtiful\Kernel\Excel($config);
$file = $excel->fileName('tutorial.xlsx')
->header(['name', 'score']);
$file->insertText(1, 0, 'viest')
->insertText(1, 1, 99)
->insertComment(1, 1, '满分接近,继续努力')
->insertCommentOpt(1, 0, '主要负责人', [
'author' => 'admin',
'font_name' => 'Arial',
'font_size' => 10,
'color' => \Vtiful\Kernel\Format::COLOR_YELLOW,
'width' => 200,
'height' => 80,
'visible' => \Vtiful\Kernel\Excel::COMMENT_DISPLAY_VISIBLE,
])
->showComment()
->output();