Link to home
Start Free TrialLog in
Avatar of Gani tpt
Gani tpt

asked on

How to set and apply RGB Color in HSSFCellStyle

Hi,
How to set and apply RGB Color in HSSFCellStyle.

For example, below is my code.

HSSFCellStyle styleHeaderSum = (HSSFCellStyle)excelFile.CreateCellStyle();
styleHeaderSum.FillForegroundColor = NPOI.HSSF.Util.HSSFColor.LightGreen.Index;

instead of "LightGreen" color, i just want to apply RGB (250,250,250) color.

How to set the color in  "styleHeaderSum.FillForegroundColor = NPOI.HSSF.Util.HSSFColor.??????
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gani tpt
Gani tpt

ASKER

Superb...Great Answer...