You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by se...@xyz.de on 2011/09/01 14:43:35 UTC
How to convert a dotx file to docx via poi?
I want to convert a dotx file to docx.
I tried the following for this. But there is allways an InvalidOperationException("You can't change the content type of a part.");
Is there any way with the api to do this?
for (PackagePart part : xmlTextExtractor.getDocument().getPackage().getParts()) {
if (part.getContentType().equals("application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml")) {
part.setContentType( "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml");
}
}
---
Nutzen Sie freenet Mail optimal angepasst für Ihr iPhone, Android oder Nokia Handy auch von unterwegs.
Alle Infos und Download unter http://mail.freenet.de/mobile-email/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org