avik        02/05/28 05:42:57

  Modified:    src/documentation/xdocs/hssf book.xml
  Added:       src/documentation/xdocs/hssf formula.xml
  Log:
  documentation for formula
  
  Revision  Changes    Path
  1.8       +1 -0      jakarta-poi/src/documentation/xdocs/hssf/book.xml
  
  Index: book.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/documentation/xdocs/hssf/book.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- book.xml  8 Apr 2002 12:58:00 -0000       1.7
  +++ book.xml  28 May 2002 12:42:57 -0000      1.8
  @@ -12,6 +12,7 @@
       <menu label="HSSF">
           <menu-item label="Quick Guide" href="quick-guide.html"/>
           <menu-item label="HOWTO" href="how-to.html"/>
  +        <menu-item label="Formula Support" href="formula.html" />
           <menu-item label="Use Case" href="use-case.html"/>
           <menu-item label="Pictorial Docs" href="diagrams.html"/>
           <menu-item label="Alternatives" href="alternatives.html"/>
  
  
  
  1.1                  jakarta-poi/src/documentation/xdocs/hssf/formula.xml
  
  Index: formula.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" 
"../dtd/document-v11.dtd">
  
  <document>
      <header>
          <title>Formula Support</title>
          <authors>
              <person email="[EMAIL PROTECTED]" name="Avik Sengupta" id="AS"/>
          </authors>
      </header>
      <body>
          <section title="Introduction">
              <p>
                  This document describes the current state of formula support in POI. 
                  The information in this document applies to the 2.0-dev version of 
POI (i.e. CVS HEAD). 
                  Since this area is a work in progress, this document will be updated 
with new features as and 
                  when they are added. 
              </p>
             
          </section>
          <section title="The basics">
                <p>
                  In org.apache.poi.hssf.usermodel.HSSFCell
                      <strong> setCellFormula(&quot;formulaString&quot;) </strong> is 
used to add a formula to sheet and 
                      <strong> getCellFormula() </strong> is used to retrieve the 
string representation of a formula. 
                  </p>
              <p>
                  We aim to support the complete excel grammer for formulas. Thus, the 
string that you pass in 
                  to the <b> setCellFormula </b> call should be what you expect to 
type into excel. Also, note 
                  that you should NOT add a "=" to the front of the string.  
              </p>
          </section>
          <section title="Supported Features">
          <ul>
               <li>Cell References</li>
               <li>String, integer and floating point literals</li>
                <li>Area references</li>
                <li>Relative or absolute references</li>
                <li>Arithmetic Operators</li>
                <li>Sheet Functions</li>
          </ul>
          </section>
          <section title="Partially supported">
              <ul>
                  <li>
                     The formula parser now has the ability to parse formulas 
containing strings. However
                     formulas that return a string value are not yet supported. 
                     </li>
                  <li>Formula tokens in Excel are stored in one of three possible <em> 
classes </em>:
                      Reference, Value and Array. Based on the location of a token, 
its class can change
                      in complicated and undocumented ways. While we have support for 
most cases, we
                      are not sure if we have covered all bases (since there is no 
documentation for this area.)
                      We would therefore like you to report any
                      occurence of #VALUE! in a cell upon opening a POI generated 
workbook in excel. (Check that
                      typing the formula into Excel directly gives a valid result.)
              </li>
                      
              </ul>
          </section>
          <section title="Not yet supported">
              <ul>
                  <li>Array formulas</li>
                  <li>Formulas with logical operations (IF) </li>
                      <li>Sheet References in formulas</li>
                      <li>Everything else :) </li>
              </ul>
          </section>
  
          <section title="Internals">
              <p>
                  Formulas in Excel are stored as  sequences of tokens in Reverse 
Polish Notation order. The 
                  <link href="http://sc.openoffice.org/excelfileformat.pdf";>open 
office XLS spec</link> is the best
                  documentation you will find for the format.
              </p>
  
              <p>
                  The tokens used by excel are modelled as individual *Ptg classes in 
the <strong>
                  org.apache.poi.hssf.record.formula</strong> package. 
              </p>
              <p>
                  The task of parsing a formula string into an array of RPN ordered 
tokens is done by the <strong>
                  org.apache.poi.hssf.record.formula.FormulaParser</strong> class. 
This class implements a hand 
                  written recursive descent parser. 
              </p>
              <p>Check out the <link 
href="http://jakarta.apache.org/poi/javadocs/";>javadocs </link> for details. 
              </p>
          </section>
         
      </body>
  </document>
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to