poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51780] [PATCH] Feature Request: How to convert a dotx file to docx via poi?
Date Wed, 29 Feb 2012 07:55:06 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51780

Yegor Kozlov <yegor@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Yegor Kozlov <yegor@dinom.ru> 2012-02-29 07:55:06 UTC ---
Replacement of content types supported in r1294998. 

There is a new method  OPCPackage.replaceContentType(String oldType, String
newType) that does the job. 

Usage:

OPCPackage pkg = OPCPackage.open(new FileInputStream("macro-workbook.xlsm"));
pkg.replaceContentType(
  "application/vnd.ms-excel.sheet.macroEnabled.main+xml",
 
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml");


  FileOutputStream out = new FileOutputStream("workbook.xlsx");
  pkg.save(out);
  out.close();

Yegor

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


Mime
View raw message