开发者

Pattern of grey color

开发者 https://www.devze.com 2023-01-23 03:58 出处:网络
<?php require_once 开发者_StackOverflow\'Spreadsheet/Excel/Writer.php\'; $workbook = new Spreadsheet_Excel_Writer();
<?php
require_once 开发者_StackOverflow'Spreadsheet/Excel/Writer.php';

$workbook = new Spreadsheet_Excel_Writer();

$format6 =& $workbook->addFormat();
$format6->setBgColor('green');
$format6->setPattern(6);
$worksheet->write(1, 1, 'the bg', $format6);

$workbook->send('setBgColor.xls');
$workbook->close();
?> 

Can you please tell me the the pattern for "Grey" color.as it is 6 in case of green .


It may be hard to answer without knowing what 'Spreadsheet/Excel/Writer.php' contains.

Have you tried simply changing $format6->setBgColor('green'); to $format6->setBgColor('grey'); (or 'gray', the spelling is interchangeable)


15, 16, and 48 are all grays. See this page for a full list: http://www.mvps.org/dmcritchie/excel/colors.htm

Pass these values to setBgColor. setPattern changes between solid fill, dots, etc.

0

精彩评论

暂无评论...
验证码 换一张
取 消