PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
ExcelWriter: BgColor of cell is not changing

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PEAR Forum Forum Index -> General PEAR questions
View previous topic :: View next topic  
Author Message
ali



Joined: 21 Feb 2008
Posts: 8

PostPosted: Fri Feb 22, 2008 7:08 am    Post subject: ExcelWriter: BgColor of cell is not changing Reply with quote

When i set BgColor of cell in format, it only changes to a dark gray color & does not set any specific color which is given as parameter.

please guide me,

thanks,
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Fri Feb 22, 2008 8:48 am    Post subject: Re: ExcelWriter: BgColor of cell is not changing Reply with quote

ali wrote:
When i set BgColor of cell in format, it only changes to a dark gray color & does not set any specific color which is given as parameter.


Show your code (at least the line in which you set the format) ...

Did you read the page about the allowed color values?
Back to top
View user's profile Send private message
ali



Joined: 21 Feb 2008
Posts: 8

PostPosted: Fri Feb 22, 2008 10:08 am    Post subject: Reply with quote

i tried
$bg_format = $workbook->AddFormat(array('align' => 'left', 'size'=>9, 'BgColor'=>18 ));

and

$bg_format = $workbook->AddFormat(array('align' => 'left', 'size'=>9, 'BgColor'=>red));
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Fri Feb 22, 2008 2:57 pm    Post subject: Reply with quote

According to the following pages, I'd say that you're looking for setFgColor():
http://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.spreadsheet-excel-writer-format.setbgcolor.php
http://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.spreadsheet-excel-writer-format.setfgcolor.php

Using red as a parameter won't work, unless you have defined a constant with this name yourself. 'red' should work.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PEAR Forum Forum Index -> General PEAR questions All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement