Bug 47698 - Incorrect cell colors.
Summary: Incorrect cell colors.
Status: RESOLVED WORKSFORME
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
URL:
Keywords:
: 47697 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-16 21:30 UTC by Thang Nguyen
Modified: 2015-07-14 20:27 UTC (History)
0 users



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

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

Hi,

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

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));

}

on input file I filled a cell with color RBG:  (221, 217, 195) and I run main
method to create CellStyle but file output display yellow color ( 255,255,152)
not the same with input file. I don't know what's happen? Please help me.


Please see details attach files.

Thanks.
Comment 1 Khanh 2009-08-17 03:03:27 UTC
I am also facing this issue. The problem occurred if:
- The file create with Excel 2007
- Use custom color for some cells
- Save file as Excel 2003 workbook
- The colored cells are convert to Excel 2003 palette color(FINE)

Problem:
- Open the file by POI
- Create a cellstyle, does not map this new stye to any cell
- The colored cells are gone into weird color (OOPS!)

It bug critical for me, any idea are appreciated.
Thanks
Comment 2 Khanh 2009-08-19 19:33:38 UTC
*** Bug 47697 has been marked as a duplicate of this bug. ***
Comment 3 Dominik Stadler 2015-05-19 19:40:02 UTC
If this is still a problem now, can you provide a self-sufficient unit-test-case to make it possible to reproduce it?
Comment 4 Dominik Stadler 2015-07-14 20:27:52 UTC
No response and cannot reproduce locally currently, therefore I am closing this for now. If this is still a problem please reopen this bug with more information.