Hello Team,
I created a table with 2 rows and 3 columns using XWPF. Now I want to know if I
can add "diagonal up border" to a cell in my table.
Something like this.
col two, row one
col three, row one
col one, row two
col two, row two
col three, row two
My code looks like this.
Diagonal borders have not been surfaced from the CT interface yet. You can do
it, but you will have to manipulate the CT structures of the table directly.
-Original Message-
From: Krishna Vyas Majji [mailto:krishna.ma...@quest-global.com]
Sent: Thursday, August 18, 2016 7:16 AM
To: user@
Here is some code that works its way from the table cell object - cell to add
an up diagonal border:
CTTc ctTc = cell.getCTTc();
CTTcPr ctTcPr = ctTc.isSetTcPr() ? ctTc.getTcPr() : ctTc.addNewTcPr();
CTTcBorders ctTcBorders = ctTcPr.isSetTcBorders() ?
ctTcPr.getTcBorders(
Mark,
Thanks for the reply. I tried your code snippet but it didn't work.
Alternatively I will go throw the reference to you provide i.e. " Office Open
XML Part 4: Markup Language Reference, December 2006 (1st edition)"
My code snippet:
//Blank Document
Ok, I didn't go all the way through it. You need to add attributes to the
border.
CTTc ctTc = cell.getCTTc();
CTTcPr ctTcPr = ctTc.isSetTcPr() ? ctTc.getTcPr() :
ctTc.addNewTcPr();
CTTcBorders ctTcBorders = ctTcPr.isSetTcBorders() ?
ctTcPr.getTcBo
Mark,
Thanks a lot. Your code snippet is working.
Regards,
Krishna
-Original Message-
From: Murphy, Mark [mailto:murphym...@metalexmfg.com]
Sent: Thursday, August 18, 2016 6:48 PM
To: 'POI Users List'
Subject: Bulk Mail : RE: How to add diagonal up border to a tablecell in word
document
Actually, I want to get the value in cells and change them to String in
Java.(numeric -> String, string -> String, and so on).
Sometimes, I'm not sure what CellType it is. So I want to know the CellType at
first, and then I can convert them to String.
As you said, I can directly use DataFormatte
Yes. DataFormatter does what you want: get the string representation of the
cell contents (numeric, date, string, boolean, blank, error, formula)
On Aug 18, 2016 18:54, "陈 杨阳" wrote:
> Actually, I want to get the value in cells and change them to String in
> Java.(numeric -> String, string -> St
Mark,
Does apache-poi supports text to be display in the cell in the format I
attached in the screen-shot.
Thanks,
Krishna
-Original Message-
From: Krishna Vyas Majji
Sent: Thursday, August 18, 2016 7:08 PM
To: POI Users List
Subject: Bulk Mail : RE: How to add diagonal up border to a