poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominik Stadler <dominik.stad...@gmx.at>
Subject Re: Re: How can I GET the diagonal border for a Cell?
Date Mon, 10 Aug 2015 20:43:52 GMT
Hi,

sorry for not answering, I was on vacation last week.

I quickly tried to put together a few lines of code which show this,
but unfortunately the diagonal borders seem to be handled differently
in the spec as the normal borders and thus require a bit more work,
let me give it another try later this week to see if it can be done or
actually needs changes in POI itself after all...

Thanks... Dominik.

On Tue, Jul 28, 2015 at 11:18 AM,  <sco_bsd@gmx.de> wrote:
> Hi Dominik,
>
> thanks for getting back to me on this issue. I created a simple file with some borders.
Here is what I found out:
> In the styles.xml file I found under: <borders count="7">
> the following entry which looks like what I need:
> <border diagonalDown="1">
>             <left/>
>             <right/>
>             <top/>
>             <bottom/>
>             <diagonal style="thin">
>                 <color auto="1"/>
>             </diagonal>
>         </border>
>         <border diagonalUp="1">
>             <left/>
>             <right/>
>             <top/>
>             <bottom/>
>             <diagonal style="thin">
>                 <color auto="1"/>
>             </diagonal>
>         </border>
>
> So what I did was create a couple of cells with borders and two with diagonal up and
down borders. How can I now read those properties with POI? Or how does such a lower level
API call look like to get those attributes? Thanks a lot already for your help.
>
> Regards
>
> Gesendet: Montag, 27. Juli 2015 um 18:41 Uhr
> Von: "Dominik Stadler" <dominik.stadler@gmx.at>
> An: "POI Users List" <user@poi.apache.org>
> Betreff: Re: How can I GET the diagonal border for a Cell?
> Hi,
>
> It seems the POI interface does not provide this currently, can you
> create two very simple files that are very similar, only one without
> this and one with this formatting and then compare the XML-files
> inside the .XLSX? .xlsx-files are just ZIPs, so you can unpack them
> and compare the files in there.
>
> When you know which data needs to be set, it is usually possible to
> use a lower level API to set these flags in POI until a full API
> becomes available.
>
> Thanks... Dominik.
>
> On Thu, Jul 23, 2015 at 1:14 PM, <sco_bsd@gmx.de> wrote:
>> Hi list,
>>
>> I know how to get the bottom, top, left and right:
>> CellStyle style = cell.getCellStyle();
>> CellReference cellRef = new CellReference(row.getRowNum(), cell.getColumnIndex());
>> System.out.println(cellRef + " Bottom: " + style.getBorderBottom());
>> System.out.println(cellRef + " Top: " + style.getBorderTop());
>> System.out.println(cellRef + " Left: " + style.getBorderLeft());
>> System.out.println(cellRef + " Right: " + style.getBorderRight());
>>
>> But how do I get the diagonal down and diagonal up?
>>
>> Thanks for your help!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>> For additional commands, e-mail: user-help@poi.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>

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


Mime
View raw message