poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38486] New: - Error retrieving cell background colour in Excel 2003
Date Thu, 02 Feb 2006 10:19:45 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38486>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38486

           Summary: Error retrieving cell background colour in Excel 2003
           Product: POI
           Version: 2.5
          Platform: PC
        OS/Version: Windows XP
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: thestonefox@hotmail.com


When I try and use the getFillBackgroundColor() method it does not return the
correct index

it returns 64 if the cell has a colour (regardless of what the colour is)
and it returns 65 if the cell has no colour

getFillForegroundColor() returns the correct colour index though, so I assume
this is a bug in getFillBackgroundColour()

I am using this on Excel 2003 if that makes any difference.


example code

int maxRows=sheet.getPhysicalNumberOfRows();

for (int i=0;i<maxRows;i++)
	{
	//check background colour
	HSSFRow checkRow = sheet.getRow(i);
	HSSFCell checkCell = checkRow.getCell((short)0);
	HSSFCellStyle bgCol=checkCell.getCellStyle();
	String myCol=String.valueOf(bgCol.getFillBackgroundColor());
	System.out.println(i+" "+myCol+ " : "+checkCell.getNumericCellValue());
	}

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


Mime
View raw message