×
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.