You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Khanh Tran <kh...@jexpa.com> on 2009/08/17 05:08:27 UTC

Set cell color without creating new cell style

Hello POI users, 

On Excel VBA, we can set cell attribute by using CellFormat object, and no
need to create any new CellStyle Object. Is there a way to do that with POI?

It seems like we always need to create new cell style when setting cell
appearance attributes. This lead to so many cell style created in the target
spreadsheet.

Thanks.

 


Re: Set cell color without creating new cell style

Posted by MSB <ma...@tiscali.co.uk>.
You can reuse the cell style objects. You only need to ceate as many cell
styles objects as you need different cell styles then apply each to as many
cells as necessary; it is not the case that you need to create a new cell
style object for every cell..

Yours

Mark B


Khanh Tran-3 wrote:
> 
> Hello POI users, 
> 
> On Excel VBA, we can set cell attribute by using CellFormat object, and no
> need to create any new CellStyle Object. Is there a way to do that with
> POI?
> 
> It seems like we always need to create new cell style when setting cell
> appearance attributes. This lead to so many cell style created in the
> target
> spreadsheet.
> 
> Thanks.
> 
>  
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Set-cell-color-without-creating-new-cell-style-tp25000416p25001221.html
Sent from the POI - User mailing list archive at Nabble.com.


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