poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murphy, Mark" <murphym...@metalexmfg.com>
Subject RE: How to add diagonal up border to a tablecell in word document using XWPF
Date Thu, 18 Aug 2016 11:34:01 GMT
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.majji@quest-global.com] 
Sent: Thursday, August 18, 2016 7:16 AM
To: user@poi.apache.org
Subject: How to add diagonal up border to a tablecell in word document using XWPF

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.

                 //Blank Document
                 XWPFDocument document= new XWPFDocument();

                 //Write the Document in file system
                 FileOutputStream out = new FileOutputStream(new File("create_table_example.docx"));

                 //create table
                 XWPFTable table = document.createTable();

                 //create first row
                 XWPFTableRow tableRowOne = table.getRow(0);
                 tableRowOne.addNewTableCell().setText("col two, row one");
                 tableRowOne.addNewTableCell().setText("col three, row one");

                 //create second row
                 XWPFTableRow tableRowTwo = table.createRow();
                 tableRowTwo.getCell(0).setText("col one, row two");
                 tableRowTwo.getCell(1).setText("col two, row two");
                 tableRowTwo.getCell(2).setText("col three, row two");



---Disclaimer------------------------------ This e-mail contains PRIVILEGED AND CONFIDENTIAL
INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient,
please notify the sender by e-mail and delete the original message. Opinions, conclusions
and other information in this transmission that do not relate to the official business of
QuEST Global and/or its subsidiaries, shall be understood as neither given nor endorsed by
it. Any statements made herein that are tantamount to contractual obligations, promises, claims
or commitments shall not be binding on the Company unless followed by written confirmation
by an authorized signatory of the Company. -----------------------------------------------------------------------------------

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

View raw message