Bug 47697 - Incorrect cell colors.
Summary: Incorrect cell colors.
Status: RESOLVED DUPLICATE of bug 47698
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.5-dev
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2009-08-16 21:19 UTC by Thang Nguyen
Modified: 2009-08-19 19:33 UTC (History)
0 users

this is the file to show affter using poi 3.5-dev write to new files. (88.80 KB, image/png)
2009-08-16 21:19 UTC, Thang Nguyen

Note You need to log in before you can comment on or make changes to this bug.
Description Thang Nguyen 2009-08-16 21:19:32 UTC
Created attachment 24141 [details]
this is the file to show affter using poi 3.5-dev write to new files.


I want to ask you about the cell color on poi 3.5-dev, this is my function to
use for this solution.

on input file I filled a cell with color RBG:  (221, 217, 195) and I run main
method co create CellStyle but file output the color display yellow color (
255,255,152) not the same with input file, Don't  clear the reason please help


public static void main(String[] args) throws Exception {

        String file = "files\\Color\\color2.xls"; (file input)
        String newFile = file + "_new.xls"; (file output)

        HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(file));
                //(create new style for new file)
        HSSFCellStyle style = wb.createCellStyle(); 

        wb.write(new FileOutputStream(newFile));


Please see details on attach files.
Comment 1 Khanh 2009-08-19 19:33:38 UTC

*** This bug has been marked as a duplicate of bug 47698 ***