标签颜色
函数原型
setTabColor(int $rgb): selfint $rgb
工作表标签颜色,使用
0xRRGGBB整数表达,也可以直接使用Format::COLOR_*常量。 例如0xFF0000为红色,0x00B050为绿色。
示例
$config = [
'path' => './tests'
];
$excel = new \Vtiful\Kernel\Excel($config);
$excel->fileName('tutorial.xlsx', 'sheet1')
->setTabColor(0xFF0000)
->addSheet('sheet2')
->setTabColor(\Vtiful\Kernel\Format::COLOR_GREEN)
->output();Last updated
Was this helpful?