You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by tamilsmani <ta...@gmail.com> on 2011/12/15 14:11:14 UTC

XWPFDocument word file creation problem

Hi all,

I am having an issue in writing docx file. I want to insert a table / page
at top of docx file.
But table is inserted at bottom.

Can you any one help me out.

Here is the code sample:
FileOutputStream outputStream = new FileOutputStream("one.docx");
		XWPFDocument document1 = new XWPFDocument(is);
		XWPFTable table = document1.createTable(2,2);
		
		
		XWPFTableRow tableOneRowOne = table.getRow(0);
        tableOneRowOne.getCell(0).setText(" Author: ");
        tableOneRowOne.getCell(1).setText(" Author: ");
        
        document1.insertTable(0, table);
        
        document1.write(outputStream);


--
View this message in context: http://apache-poi.1045710.n5.nabble.com/XWPFDocument-word-file-creation-problem-tp5077419p5077419.html
Sent from the POI - User mailing list archive at Nabble.com.

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