]> source.dussan.org Git - poi.git/commitdiff
added a note on Compatibility of POI-generated .xlsx files with MS Office 2008 for...
authorYegor Kozlov <yegor@apache.org>
Thu, 30 Jul 2009 13:49:25 +0000 (13:49 +0000)
committerYegor Kozlov <yegor@apache.org>
Thu, 30 Jul 2009 13:49:25 +0000 (13:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@799264 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/spreadsheet/index.xml
src/documentation/content/xdocs/status.xml

index bddd79c6b428093c9207ee71de24fbd935c4c9c1..d385c995263273abb94665bc506e3fc6d2fe1518 100644 (file)
         can also generate spreadsheets this way.
             </p>
         </section>
+        <section>
+          <title>Compatibility of POI-generated .xlsx files with MS Office 2008 for Mac SP2</title>
+          <p>
+            Office 2008 for Mac SP2 version 12.2.0 has a serious bug causing some Open XML files to fail to open. 
+            This bug is affecting Open XML files from a variety of sources including the Apache POI project. 
+            The Apache POI project adjusted the XSSF module to produce "MS-compatible OOXML" by setting the Application extended property to "Microsoft Excel". This will allow users of future versions of Apache POI to produce OOXML documents that will work with Office 2008 for Mac SP2. 
+            Please see <link href="https://issues.apache.org/bugzilla/show_bug.cgi?id=47559">Bugzilla 47559</link> for more information.
+          </p>
+          <p>
+            Users are advised to patch existing .xlsx files by the following code:
+          </p>
+          <source>
+  XSSFWorkbook wb = new XSSFWorkbook(path);
+
+  POIXMLProperties.ExtendedProperties ext = wb.getProperties().getExtendedProperties();
+  expProps.getUnderlyingProperties().setApplication("Microsoft Excel");
+
+  FileOutputStream out = new FileOutputStream(path);
+  wb.write(out);
+  out.close(); 
+        </source>  
+        <p>To unset the Application property use the following code:</p>
+        <source>  
+  POIXMLProperties.ExtendedProperties ext = workbook.getProperties().getExtendedProperties();
+  expProps.getUnderlyingProperties().unsetApplication();
+        </source>  
+          <warning>
+            This is an effective workaround for a short-term bug which is likely to be removed in future versions of POI, 
+            when Microsoft returns to compliance with the standard. The proper value for Apache POI created documents would to be "Apache POI" and not "Microsoft Excel".  
+        </warning>
+        </section>
     </body>
 </document>
index a3ca8ccbfc4449cac2640ea4662b4087a27c1337..af9bb5a6b3b04bd35bfc08a8fe9c011c99ab2397 100644 (file)
@@ -37,7 +37,8 @@
            <action dev="POI-DEVELOPERS" type="fix">47571 - Fixed XWPFWordExtractor to extract inserted/deleted text</action>
            <action dev="POI-DEVELOPERS" type="fix">47548 - Fixed RecordFactoryInputStream to properly read continued DrawingRecords</action>
            <action dev="POI-DEVELOPERS" type="fix">46419 - Fixed compatibility issue with OpenOffice 3.0</action>
-           <action dev="POI-DEVELOPERS" type="fix">47559 - Fixed compatibility issue with Excel 2008 Mac sp2</action>
+           <action dev="POI-DEVELOPERS" type="fix">47559 - Fixed compatibility issue with Excel 2008 Mac sp2. Please see 
+             <link href="./spreadsheet/index.html"> the HSSF+XSSF project page</link> for more information. </action>
            <action dev="POI-DEVELOPERS" type="fix">47540 - Fix for saving custom and extended OOXML properties</action>
            <action dev="POI-DEVELOPERS" type="fix">47535 - Fixed WordExtractor to tolerate files with empty footnote block</action>
            <action dev="POI-DEVELOPERS" type="fix">47517 - Fixed ExtractorFactory to support .xltx and .dotx files</action>