https://issues.apache.org/bugzilla/show_bug.cgi?id=45492
Summary: HSSFCellStyle.getFillBackgroundColor() does always
return 64
Product: POI
Version: unspecified
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Created an attachment (id=22323)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=22323)
Test workbook
Version: 3.1-FINAL-20080629 (not in the version listbox)
After upgrading POI library to version 3.1 FINAL in my project I have found
that there is a bug in retrieving fill background color. It returns value 64
for any cell in the worksheet.
I attach sample Excel file (created in Excel 2000 if it does matter), on which
the following code fails.
<pre>
HSSFSheet sheet = workBook.getSheet( "Sheet1" );
HSSFRow row = sheet.getRow( sheet.getFirstRowNum() );
StringBuilder sb = new StringBuilder( "Background color test:\n");
boolean flag = false;
for( short colIx = row.getFirstCellNum(); colIx < row.getLastCellNum();
colIx++ )
{
HSSFCell cell = row.getCell( colIx );
if( cell == null )
{
continue;
}
short bgColor = cell.getCellStyle().getFillBackgroundColor();
if( bgColor != 64 )
{
flag = true;
}
sb.append( "Column " ).append( colIx ).append( " has background color
index " )
.append( bgColor ).append( "\n" );
}
System.out.println( sb.toString() );
assertTrue( flag );
</pre>
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]