Some HSSF Help

Joined
Jul 13, 2009
Messages
1
Reaction score
0
Hi all. I was hoping someone knowledgeable about the poi HSSF API could help me with a problem I have.

I am creating an excel file, but I need to change the "background" for all my cells to be grey, so that everything except my data is greyed out. Easily in excel I'd do this by clicking 'Format > Style > Modify > Pattern' and then choosing whatever color (in this case grey, color index 15).

Is there a way to do this with HSSF? I've looked through the API but can't find any way of referencing all cells, or a HSSFSheet method to do this. The only way I can figure out to do this is to brute-force create each cell and set it to a predefined grey CellStyle which is ick.

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top