[prev in list] [next in list] [prev in thread] [next in thread] 

List:       poi-user
Subject:    Aw: Re: How can I GET the diagonal border for a Cell?
From:       sco_bsd () gmx ! de
Date:       2015-07-28 9:18:33
Message-ID: trinity-42f460f4-c30f-40d8-bb74-bcd3b16a18fb-1438075113015 () 3capp-gmx-bs48
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic