On Wed, 22 Jan 2014, Perundevi wrote:
I am using POI 3.9. I want to create a word document using xwpf.

Have you tried a recent nightly build? Otherwise, I'd suggest you hang on about a week and re-try with 3.10 final when that's out

I need to know, how to create document's default styles, like run style,
para style, default font etc.,

I am using the following code,

if( document.getStyles() == null) {
    XWPFStyles styles = document.createStyles();
}

CTDocDefaults def = document.getStyle().addNewDocDefaults();

The above line throws the exception like "Expecting one Styles document
part, but found".

If the problem isn't fixed in the current codebase, your best bet is to write a very small junit unit test that shows the problem, and then raise a bug in bugzilla for it

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to