× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



The method you are looking for is getFillBackgroundColor from the
HSSFCellStyle class. It will return a short that corresponds to the
colors you pass into setFillBackgroundColor if you are already using
those. I haven't had a chance to look at Scott Klement's latest headers
and service program to see if he has implemented those yet, but so far
I've been able to hack most anything I needed out of the POI doc's and
Scott's original headers.

The docs for the POI method is here:
http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFCellStyl
e.html#getFillBackgroundColor()

Scott's latest headers are here:
http://www.systeminetwork.com/artarchive/newsletter/w/1001/i/-1/a/55032/
index.html

I haven't looked at those yet, but I'm on my todo list to get the POI on
my system updated and to merge the headers I've added over the years to
the work Scott has done.

Kevin

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Lee Arrison
Sent: Monday, September 10, 2007 1:28 PM
To: RPG400-L@xxxxxxxxxxxx
Subject: HSSF - read cell colors

I am using HSSF to read a spreadsheet and need to be able to tell the
background color of a cell. I have found documentation to set the color,
but not read it.
Thanks,

Lee Arrison
Application Group Manager
Sturm, Ruger & Co., Inc.
Newport, NH

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.