# Change Header of Microsoft Office Word 2007 by utilizing Apache POI XWPF library

My requirement is write document code towards the header from the document. The document has a header which compose of the table. I have to achieve a cell and write document code. Now, I'm able to obtain the header and browse the information but I am unable to alter the header.

``````                       InputStream input = new FileInputStream("D:\\test.docx");
XWPFDocument document=new XWPFDocument(input);