poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MSB <markbrd...@tiscali.co.uk>
Subject Re: DO NOT REPLY [Bug 48962] New: XSSFColor.getRgb() always returns null
Date Tue, 30 Mar 2010 16:50:50 GMT

Have been playng about with some code recently because I was trying to track
down that part of the API where the raw xml is parsed. Sadly, that came to
nought as I was confronted with factory methods that I could not 'hack' in
order to track which concrete call instances were created; these factory
methods were in compiled classes within archives and I did not have access
to the source sadly.

So, I returned to the xml and had a second look. It was at that point that I
saw something a little confusing. I believed I had been setting the
background colour of the cell but that value was not recorded at all in the
xml. What was recorded was the rgb value for the cells foreground colour and
this value was returned correctly when i called the getRgb method on the
XSSFColor object returned by calling the getFillForegroundXSSFColor() method
on the cells style. So, it may be the case that you are trying to
interrogate the wrong object.


Mark B

Bugzilla from bugzilla@apache.org wrote:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=48962
>            Summary: XSSFColor.getRgb() always returns null
>            Product: POI
>            Version: 3.6
>           Platform: Macintosh
>         OS/Version: Mac OS X 10.4
>             Status: NEW
>           Severity: normal
>           Priority: P2
>          Component: XSSF
>         AssignedTo: dev@poi.apache.org
>         ReportedBy: mkbitbucket@mac.com
> Created an attachment (id=25167)
>  --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25167)
> Example file with font and background colors
> When examining an XLSX file created with Microsoft Excel that has both
> font
> colors and background colors in it, those colors cannot be extracted
> because
> the XSSFColor method always returns null.
> 1) Open the attached XLSX file (or any XLSX file that has a font color or
> fill
> color)
> 2) Navigate the sheet to one of the cells with color
> 3) Get that cell's style and font and notice that the getXSSFColor()
> method
> returns non-null XSSFColor
> 4) Call getRgb() on the XSSFColor and receive null value in return
> An array with the RGB values should be returned.
> To make this bug more painful, I have been unable to find any workaround.
> -- 
> 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: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org

View this message in context: http://old.nabble.com/DO-NOT-REPLY--Bug-48962--New%3A-XSSFColor.getRgb%28%29-always-returns-null-tp27993612p28085329.html
Sent from the POI - Dev mailing list archive at Nabble.com.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message