You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2015/03/26 17:45:12 UTC

svn commit: r1669369 - in /poi/site: publish/faq.html src/documentation/content/xdocs/faq.xml

Author: nick
Date: Thu Mar 26 16:45:12 2015
New Revision: 1669369

URL: http://svn.apache.org/r1669369
Log:
Re-jig the change, so that FAQ numbers are not altered

Modified:
    poi/site/publish/faq.html
    poi/site/src/documentation/content/xdocs/faq.xml

Modified: poi/site/publish/faq.html
URL: http://svn.apache.org/viewvc/poi/site/publish/faq.html?rev=1669369&r1=1669368&r2=1669369&view=diff
==============================================================================
--- poi/site/publish/faq.html (original)
+++ poi/site/publish/faq.html Thu Mar 26 16:45:12 2015
@@ -255,93 +255,93 @@ if (VERSION > 3) {
     </a>
 </li>
 <li>
-<a name="faq-N10020-menu"></a><a href="#faq-N10020">
+<a name="faq-N10019-menu"></a><a href="#faq-N10019">
       My code uses the scratchpad, compiles fine but fails to run with a "MethodNotFoundException"
     </a>
 </li>
 <li>
-<a name="faq-N1002C-menu"></a><a href="#faq-N1002C">
+<a name="faq-N10025-menu"></a><a href="#faq-N10025">
       I'm using the poi-ooxml-schemas jar, but my code is failing with "java.lang.NoClassDefFoundError: org/openxmlformats/schemas/*something*"
     </a>
 </li>
 <li>
-<a name="faq-N10061-menu"></a><a href="#faq-N10061">
+<a name="faq-N1005A-menu"></a><a href="#faq-N1005A">
       Why is reading a simple sheet taking so long?
     </a>
 </li>
 <li>
-<a name="faq-N1006D-menu"></a><a href="#faq-N1006D">
+<a name="faq-N10066-menu"></a><a href="#faq-N10066">
       What is the HSSF "eventmodel"?
     </a>
 </li>
 <li>
-<a name="faq-N10079-menu"></a><a href="#faq-N10079">
+<a name="faq-N10072-menu"></a><a href="#faq-N10072">
       Why can't read the document I created using Star Office 5.1?
     </a>
 </li>
 <li>
-<a name="faq-N10085-menu"></a><a href="#faq-N10085">
+<a name="faq-N1007E-menu"></a><a href="#faq-N1007E">
       Why am I getting an exception each time I attempt to read my spreadsheet?
     </a>
 </li>
 <li>
-<a name="faq-N10094-menu"></a><a href="#faq-N10094">
+<a name="faq-N1008D-menu"></a><a href="#faq-N1008D">
       How do you tell if a spreadsheet cell contains a date?
     </a>
 </li>
 <li>
-<a name="faq-N100A4-menu"></a><a href="#faq-N100A4">
+<a name="faq-N1009D-menu"></a><a href="#faq-N1009D">
       I'm trying to stream an XLS file from a servlet and I'm having some trouble.  What's the problem?
     </a>
 </li>
 <li>
-<a name="faq-N100CE-menu"></a><a href="#faq-N100CE">
+<a name="faq-N100C7-menu"></a><a href="#faq-N100C7">
       I want to set a cell format (Data format of a cell) of a excel sheet as ###,###,###.#### or ###,###,###.0000.    Is it possible using POI ?
     </a>
 </li>
 <li>
-<a name="faq-N100DE-menu"></a><a href="#faq-N100DE">
+<a name="faq-N100D7-menu"></a><a href="#faq-N100D7">
       I want to set a cell format (Data format of a cell) of a excel sheet as text.    Is it possible using POI ?
     </a>
 </li>
 <li>
-<a name="faq-N100EA-menu"></a><a href="#faq-N100EA">
+<a name="faq-N100E3-menu"></a><a href="#faq-N100E3">
       How do I add a border around a merged cell?
     </a>
 </li>
 <li>
-<a name="faq-N100F6-menu"></a><a href="#faq-N100F6">
+<a name="faq-N100EF-menu"></a><a href="#faq-N100EF">
       I am using styles when creating a workbook in POI, but Excel refuses to open the file, complaining about "Too Many Styles".
     </a>
 </li>
 <li>
-<a name="faq-N10110-menu"></a><a href="#faq-N10110">
+<a name="faq-N10109-menu"></a><a href="#faq-N10109">
       I think POI is using too much memory! What can I do?
     </a>
 </li>
 <li>
-<a name="faq-N10131-menu"></a><a href="#faq-N10131">
+<a name="faq-N1012A-menu"></a><a href="#faq-N1012A">
       I can't seem to find the source for the OOXML CT.. classes, where do they
       come from?
     </a>
 </li>
 <li>
-<a name="faq-N10159-menu"></a><a href="#faq-N10159">
+<a name="faq-N10152-menu"></a><a href="#faq-N10152">
       An OLE2 ("binary") file is giving me problems, but I can't share it. How can I investigate the problem on my own?
     </a>
 </li>
 <li>
-<a name="faq-N10173-menu"></a><a href="#faq-N10173">
+<a name="faq-N1016C-menu"></a><a href="#faq-N1016C">
       An OOXML ("xml") file is giving me problems, but I can't share it. How can I investigate the problem on my own?
     </a>
 </li>
 <li>
-<a name="faq-N10185-menu"></a><a href="#faq-N10185">
+<a name="faq-N1017E-menu"></a><a href="#faq-N1017E">
       Why do I get a java.lang.NoClassDefFoundError: javax/xml/stream/XMLEventFactory.newFactory()
     </a>
 </li>
 <li>
-<a name="faq-N101A3-menu"></a><a href="#faq-N101A3">
+<a name="faq-N1019C-menu"></a><a href="#faq-N1019C">
       Can I mix POI jars from different versions?
     </a>
 </li>
@@ -357,14 +357,16 @@ if (VERSION > 3) {
     </h4>
 </div>
       
-<p>You almost certainly have an older version of POI 
+<p>You almost certainly have an older version of Apache POI 
 	on your classpath. Quite a few runtimes and other packages 
-	will ship an older version of POI, so this is an easy problem
-	to hit without your realising.</p>
-      
-<p>The best way to identify the offending earlier jar file is
-	with a few lines of java. These will load one of the core POI
-	classes, and report where it came from.</p>
+	will ship older version of Apache POI, so this is an easy problem
+	to hit without your realising. Some will ship just one old jar,
+   some may ship a full set of old POI jars.</p>
+      
+<p>The best way to identify the offending earlier jar files is
+	with a few lines of java. These will load a Core POI class, an
+   OOXML class and a Scratchpad class, and report where they all came
+   from.</p>
       
 <pre class="code">
 ClassLoader classloader =
@@ -373,15 +375,10 @@ URL res = classloader.getResource(
              "org/apache/poi/poifs/filesystem/POIFSFileSystem.class");
 String path = res.getPath();
 System.out.println("POI Core came from " + path);
-      </pre>
-      
-<p>To find out which jar file the POI OOXML and Scratchpad classes 
-   are coming from, try these few lines of java:</p>
-      
-<pre class="code">
-ClassLoader classloader = org.apache.poi.POIXMLDocument.class.getClassLoader();
-URL res = classloader.getResource("org/apache/poi/POIXMLDocument.class");
-String path = res.getPath();
+
+classloader = org.apache.poi.POIXMLDocument.class.getClassLoader();
+res = classloader.getResource("org/apache/poi/POIXMLDocument.class");
+path = res.getPath();
 System.out.println("POI OOXML came from " + path);
 
 classloader = org.apache.poi.hslf.HSLFSlideShow.class.getClassLoader();
@@ -390,7 +387,7 @@ path = res.getPath();
 System.out.println("POI Scratchpad came from " + path);
       </pre>
     
-<a name="faq-N10020"></a>
+<a name="faq-N10019"></a>
 <div class="h4">
 <h4>2. 
       My code uses the scratchpad, compiles fine but fails to run with a "MethodNotFoundException"
@@ -400,7 +397,7 @@ System.out.println("POI Scratchpad came
 <p>You almost certainly have an older version earlier on your
 	classpath. See the prior answer.</p>
     
-<a name="faq-N1002C"></a>
+<a name="faq-N10025"></a>
 <div class="h4">
 <h4>3. 
       I'm using the poi-ooxml-schemas jar, but my code is failing with "java.lang.NoClassDefFoundError: org/openxmlformats/schemas/*something*"
@@ -450,7 +447,7 @@ System.out.println("POI Scratchpad came
        POI 3.7 won't work with ooxml-schemas-1.0.jar (it needs the newer
        one).</p>
     
-<a name="faq-N10061"></a>
+<a name="faq-N1005A"></a>
 <div class="h4">
 <h4>4. 
       Why is reading a simple sheet taking so long?
@@ -464,7 +461,7 @@ System.out.println("POI Scratchpad came
         errors are thrown as exceptions, which means you probably don't need
         logging.</p>
     
-<a name="faq-N1006D"></a>
+<a name="faq-N10066"></a>
 <div class="h4">
 <h4>5. 
       What is the HSSF "eventmodel"?
@@ -476,7 +473,7 @@ System.out.println("POI Scratchpad came
         tenfold.  It is based on the AWT event model in combination with SAX.  If you need read-only
         access, this is the best way to do it.</p>
     
-<a name="faq-N10079"></a>
+<a name="faq-N10072"></a>
 <div class="h4">
 <h4>6. 
       Why can't read the document I created using Star Office 5.1?
@@ -486,7 +483,7 @@ System.out.println("POI Scratchpad came
 <p>Star Office 5.1 writes some records using the older BIFF standard.  This causes some problems
         with POI which supports only BIFF8.</p>
     
-<a name="faq-N10085"></a>
+<a name="faq-N1007E"></a>
 <div class="h4">
 <h4>7. 
       Why am I getting an exception each time I attempt to read my spreadsheet?
@@ -498,7 +495,7 @@ System.out.println("POI Scratchpad came
 	<a href="http://issues.apache.org/bugzilla/buglist.cgi?product=POI">Bugzilla.</a>
 </p>
     
-<a name="faq-N10094"></a>
+<a name="faq-N1008D"></a>
 <div class="h4">
 <h4>8. 
       How do you tell if a spreadsheet cell contains a date?
@@ -525,7 +522,7 @@ System.out.println("POI Scratchpad came
          }
       </pre>
     
-<a name="faq-N100A4"></a>
+<a name="faq-N1009D"></a>
 <div class="h4">
 <h4>9. 
       I'm trying to stream an XLS file from a servlet and I'm having some trouble.  What's the problem?
@@ -577,7 +574,7 @@ System.out.println("POI Scratchpad came
       </p>
       
     
-<a name="faq-N100CE"></a>
+<a name="faq-N100C7"></a>
 <div class="h4">
 <h4>10. 
       I want to set a cell format (Data format of a cell) of a excel sheet as ###,###,###.#### or ###,###,###.0000.    Is it possible using POI ?
@@ -588,7 +585,7 @@ System.out.println("POI Scratchpad came
 	Yes.  You first need to get a DataFormat object from the workbook and call getFormat with the desired format.  Some examples are <a href="spreadsheet/quick-guide.html#DataFormats">here</a>.
       </p>
     
-<a name="faq-N100DE"></a>
+<a name="faq-N100D7"></a>
 <div class="h4">
 <h4>11. 
       I want to set a cell format (Data format of a cell) of a excel sheet as text.    Is it possible using POI ?
@@ -599,7 +596,7 @@ System.out.println("POI Scratchpad came
 	Yes.  This is a built-in format for excel that you can get from DataFormat object using the format string "@".  Also, the string "text" will alias this format.
       </p>
     
-<a name="faq-N100EA"></a>
+<a name="faq-N100E3"></a>
 <div class="h4">
 <h4>12. 
       How do I add a border around a merged cell?
@@ -609,7 +606,7 @@ System.out.println("POI Scratchpad came
 <p>Add blank cells around where the cells normally would have been and set the borders individually for each cell.
         We will probably enhance HSSF in the future to make this process easier.</p>
     
-<a name="faq-N100F6"></a>
+<a name="faq-N100EF"></a>
 <div class="h4">
 <h4>13. 
       I am using styles when creating a workbook in POI, but Excel refuses to open the file, complaining about "Too Many Styles".
@@ -695,7 +692,7 @@ System.out.println("POI Scratchpad came
  fileOut.close();
       </pre>
     
-<a name="faq-N10110"></a>
+<a name="faq-N10109"></a>
 <div class="h4">
 <h4>14. 
       I think POI is using too much memory! What can I do?
@@ -734,7 +731,7 @@ System.out.println("POI Scratchpad came
      files). If these tests are fast, then any performance problems are in your
      code!</p>
     
-<a name="faq-N10131"></a>
+<a name="faq-N1012A"></a>
 <div class="h4">
 <h4>15. 
       I can't seem to find the source for the OOXML CT.. classes, where do they
@@ -765,7 +762,7 @@ System.out.println("POI Scratchpad came
          automatically download the specification XML Schema, and compile it for 
          you to generate the source and binary ooxml-schemas jars.</p>
     
-<a name="faq-N10159"></a>
+<a name="faq-N10152"></a>
 <div class="h4">
 <h4>16. 
       An OLE2 ("binary") file is giving me problems, but I can't share it. How can I investigate the problem on my own?
@@ -790,7 +787,7 @@ System.out.println("POI Scratchpad came
         allow you to check that things are being read as you expect, and 
         narrow in on problem records and structures.</p>
     
-<a name="faq-N10173"></a>
+<a name="faq-N1016C"></a>
 <div class="h4">
 <h4>17. 
       An OOXML ("xml") file is giving me problems, but I can't share it. How can I investigate the problem on my own?
@@ -812,7 +809,7 @@ System.out.println("POI Scratchpad came
          unable to then include the snippet of XML for the problem area, and
          reference the OOXML standard for what it should contain.</p>
     
-<a name="faq-N10185"></a>
+<a name="faq-N1017E"></a>
 <div class="h4">
 <h4>18. 
       Why do I get a java.lang.NoClassDefFoundError: javax/xml/stream/XMLEventFactory.newFactory()
@@ -846,7 +843,7 @@ System.out.println("POI Scratchpad came
 	  
 </ul>
     
-<a name="faq-N101A3"></a>
+<a name="faq-N1019C"></a>
 <div class="h4">
 <h4>19. 
       Can I mix POI jars from different versions?

Modified: poi/site/src/documentation/content/xdocs/faq.xml
URL: http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/faq.xml?rev=1669369&r1=1669368&r2=1669369&view=diff
==============================================================================
--- poi/site/src/documentation/content/xdocs/faq.xml (original)
+++ poi/site/src/documentation/content/xdocs/faq.xml Thu Mar 26 16:45:12 2015
@@ -25,13 +25,15 @@
       My code uses some new feature, compiles fine but fails when live with a "MethodNotFoundException" or "IncompatibleClassChangeError"
     </question>
     <answer>
-      <p>You almost certainly have an older version of POI 
+      <p>You almost certainly have an older version of Apache POI 
 	on your classpath. Quite a few runtimes and other packages 
-	will ship an older version of POI, so this is an easy problem
-	to hit without your realising.</p>
-      <p>The best way to identify the offending earlier jar file is
-	with a few lines of java. These will load one of the core POI
-	classes, and report where it came from.</p>
+	will ship older version of Apache POI, so this is an easy problem
+	to hit without your realising. Some will ship just one old jar,
+   some may ship a full set of old POI jars.</p>
+      <p>The best way to identify the offending earlier jar files is
+	with a few lines of java. These will load a Core POI class, an
+   OOXML class and a Scratchpad class, and report where they all came
+   from.</p>
       <source>
 ClassLoader classloader =
    org.apache.poi.poifs.filesystem.POIFSFileSystem.class.getClassLoader();
@@ -39,13 +41,10 @@ URL res = classloader.getResource(
              "org/apache/poi/poifs/filesystem/POIFSFileSystem.class");
 String path = res.getPath();
 System.out.println("POI Core came from " + path);
-      </source>
-      <p>To find out which jar file the POI OOXML and Scratchpad classes 
-   are coming from, try these few lines of java:</p>
-      <source>
-ClassLoader classloader = org.apache.poi.POIXMLDocument.class.getClassLoader();
-URL res = classloader.getResource("org/apache/poi/POIXMLDocument.class");
-String path = res.getPath();
+
+classloader = org.apache.poi.POIXMLDocument.class.getClassLoader();
+res = classloader.getResource("org/apache/poi/POIXMLDocument.class");
+path = res.getPath();
 System.out.println("POI OOXML came from " + path);
 
 classloader = org.apache.poi.hslf.HSLFSlideShow.class.getClassLoader();



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