You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by David Fisher <df...@jmlafferty.com> on 2009/07/25 18:23:16 UTC

Workaround for Office 2008 SP2 for MacOSX and Support for OpenOffice 3.0

The Apache POI project is pleased to announce a workaround for trouble  
opening and creating OOXML documents in Microsoft's recent update to  
Office 2008 for MacOSX - Office 2008 SP2.

We are also pleased to announce support for OpenOffice 3.0 and OOXML.

Get the latest nightly build from http://encore.torchbox.com/poi-svn-build/

Newly created documents using this version need no patching.

Users are advised to patch existing .docx and .xlsx by the following  
code:

(1) Patching XSSF:

XSSFWorkbook wb = new XSSFWorkbook(path);

POIXMLProperties.ExtendedProperties ext =  
wb.getProperties().getExtendedProperties();
ext.getUnderlyingProperties().setAppVersion("Microsoft Excel");

FileOutputStream out = new FileOutputStream(path);
wb.write(out);
out.close();

(2) Patching XWPF:

XWPFDocument doc = new XWPFDocument(OPCPackage.open(path));

POIXMLProperties.ExtendedProperties ext =  
doc.getProperties().getExtendedProperties();
ext.getUnderlyingProperties().setAppVersion("Microsoft Office Word");

FileOutputStream out = new FileOutputStream(path);
doc.write(out);
out.close();

(3) Patching for OpenOffice:

See the sample code attached to https://issues.apache.org/bugzilla/show_bug.cgi?id=46419 
  - comments 9 and 10.

The project would like to thank Leif Nelson of Lawrence Livermore  
National Laboratories for his contributions helping us resolve these  
issues.

Regards,
David FIsher for the Apache POI Team


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