Yes, unfortunately that is the way the Excel developers decided to put
Styles into the format way back then (i.e. each different style needs
to be defined and should be re-used across cells if possible) and it
is not easy to shield the developer who is using POI from these
complexities as it would likely cause big performance problems with
larger spreadsheets with many different styles.

Unfortunately for now at least you have to decide on your own how you
best re-use styles in your specific application of POI, but we are
open to take suggestions (in code form with unit-test coverage,
naturally :( ) of how you think it would be easier to manage these on
top of POI.

Dominik.

On Tue, Jun 30, 2015 at 4:55 PM, Murphy, Mark <[email protected]> wrote:
> Ok, but I don't see where I can apply those properties to a cell or range, 
> Only to a CellStyle. So I then have to create a bunch of cell styles to 
> handle Upper left corner, upper right corner, upper border, right border, 
> left border, bottom border, bottom right corner, and bottom left corner, not 
> to mention the special cases where I want to do a single cell, or a range 
> that is one cell wide or one cell deep. And If I want to give some of these 
> bordered cells a background, and others not, it becomes even more complex no? 
> In Excel I can simply grab a range, and apply the borders I want. How do I do 
> that with POI?
>
> -----Original Message-----
> From: Dominik Stadler [mailto:[email protected]]
> Sent: Monday, June 29, 2015 3:05 PM
> To: POI Users List
> Subject: Re: Borders and ranges
>
> Not sure I understand the question correctly, but wouldn't you just apply 
> top/left/bottom/right borders as appropriate to get the larger box? At least 
> that is what you can do in Excel to get such an effect...
>
> Dominik
> Am 29.06.2015 20:19 schrieb "Murphy, Mark" <[email protected]>:
>
>> I understand how to apply a border to an individual cell using a cell
>> style, and I found documentation on how to apply a border to a merged
>> range of cells, but how do I apply an outside border to a range of unmerged 
>> cells.
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to