poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye...@apache.org
Subject svn commit: r902566 - in /poi/trunk/src: documentation/content/xdocs/status.xml examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java
Date Sun, 24 Jan 2010 13:40:58 GMT
Author: yegor
Date: Sun Jan 24 13:40:58 2010
New Revision: 902566

URL: http://svn.apache.org/viewvc?rev=902566&view=rev
Log:
avoid failures in XLSX2CSV when shared string table is missing, see Bugzilla 48544

Modified:
    poi/trunk/src/documentation/content/xdocs/status.xml
    poi/trunk/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=902566&r1=902565&r2=902566&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Sun Jan 24 13:40:58 2010
@@ -34,6 +34,7 @@
 
     <changes>
         <release version="3.7-SNAPSHOT" date="2010-??-??">
+           <action dev="POI-DEVELOPERS" type="fix">48544 - avoid failures in XLSX2CSV
when shared string table is missing</action>
            <action dev="POI-DEVELOPERS" type="fix">48571 - properly close all IO streams
created in OPCPackage</action>
            <action dev="POI-DEVELOPERS" type="fix">48572 - always copy all declared
inner classes and interfaces when generating poi-ooxml-schemas</action>
            <action dev="POI-DEVELOPERS" type="add">Low Level record support for the
ExtRst (phonetic text) part of Unicode Strings. No usermodel access to it as yet though.</action>

Modified: poi/trunk/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java?rev=902566&r1=902565&r2=902566&view=diff
==============================================================================
--- poi/trunk/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java (original)
+++ poi/trunk/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java Sun Jan 24
13:40:58 2010
@@ -151,8 +151,12 @@
                 throws IOException, SAXException, ParserConfigurationException {
             ArrayList<PackagePart> parts =
                     pkg.getPartsByContentType(XSSFRelation.SHARED_STRINGS.getContentType());
-            PackagePart sstPart = parts.get(0);
-            readFrom(sstPart.getInputStream());
+
+            // Some workbooks have no shared strings table.
+            if (parts.size() > 0) {
+                PackagePart sstPart = parts.get(0);
+                readFrom(sstPart.getInputStream());
+            }
         }
 
         /**



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


Mime
View raw message