Java Doc for HSSFFormulaEvaluator.java in  » Collaboration » poi-3.0.2-beta2 » org » apache » poi » hssf » usermodel » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Collaboration » poi 3.0.2 beta2 » org.apache.poi.hssf.usermodel 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator

HSSFFormulaEvaluator
public class HSSFFormulaEvaluator (Code)

author:
   Amol S. Deshmukh < amolweb at ya hoo dot com >
author:
   Limitations: Unfortunately, cyclic references will cause stackoverflow
author:
   exception

Inner Class :final public static class CellValue

Field Summary
protected  HSSFRowrow
    
protected  HSSFSheetsheet
    
protected  HSSFWorkbookworkbook
    

Constructor Summary
public  HSSFFormulaEvaluator(HSSFSheet sheet, HSSFWorkbook workbook)
    

Method Summary
public  CellValueevaluate(HSSFCell cell)
     If cell contains a formula, the formula is evaluated and returned, else the CellValue simply copies the appropriate cell value from the cell and also its cell type.
public  HSSFCellevaluateInCell(HSSFCell cell)
     If cell contains formula, it evaluates the formula, and puts the formula result back into the cell. Else if cell does not contain formula, this method leaves the cell unchanged.
protected static  CellValuegetCellValueForEval(ValueEval eval)
     Returns a CellValue wrapper around the supplied ValueEval instance.
protected static  ValueEvalgetEvalForCell(HSSFCell cell, HSSFRow row, HSSFSheet sheet, HSSFWorkbook workbook)
     Given a cell, find its type and from that create an appropriate ValueEval impl instance and return that.
protected static  EvalgetEvalForPtg(Ptg ptg)
     returns an appropriate Eval impl instance for the Ptg.
protected static  EvalgetOperationEvalForPtg(OperationPtg ptg)
    
public static  FormulaParsergetUnderlyingParser(HSSFWorkbook workbook, String formula)
     Returns an underlying FormulaParser, for the specified Formula String and HSSFWorkbook. This will allow you to generate the Ptgs yourself, if your needs are more complex than just having the formula evaluated.
 voidinspectPtgs(String formula)
    
protected static  ValueEvalinternalEvaluate(HSSFCell srcCell, HSSFRow srcRow, HSSFSheet sheet, HSSFWorkbook workbook)
     Dev.
protected static  voidpushRef2DEval(ReferencePtg ptg, Stack stack, HSSFCell cell, HSSFRow row, HSSFSheet sheet, HSSFWorkbook workbook)
     create a Ref2DEval for ReferencePtg and push it on the stack.
protected static  voidpushRef3DEval(Ref3DPtg ptg, Stack stack, HSSFCell cell, HSSFRow row, HSSFSheet sheet, HSSFWorkbook workbook)
     create a Ref3DEval for Ref3DPtg and push it on the stack.
public  voidsetCurrentRow(HSSFRow row)
    

Field Detail
row
protected HSSFRow row(Code)



sheet
protected HSSFSheet sheet(Code)



workbook
protected HSSFWorkbook workbook(Code)




Constructor Detail
HSSFFormulaEvaluator
public HSSFFormulaEvaluator(HSSFSheet sheet, HSSFWorkbook workbook)(Code)




Method Detail
evaluate
public CellValue evaluate(HSSFCell cell)(Code)
If cell contains a formula, the formula is evaluated and returned, else the CellValue simply copies the appropriate cell value from the cell and also its cell type. This method should be preferred over evaluateInCell() when the call should not modify the contents of the original cell.
Parameters:
  cell -



evaluateInCell
public HSSFCell evaluateInCell(HSSFCell cell)(Code)
If cell contains formula, it evaluates the formula, and puts the formula result back into the cell. Else if cell does not contain formula, this method leaves the cell unchanged. Note that the same instance of HSSFCell is returned to allow chained calls like:
 int evaluatedCellType = evaluator.evaluateInCell(cell).getCellType();
 

Parameters:
  cell -



getCellValueForEval
protected static CellValue getCellValueForEval(ValueEval eval)(Code)
Returns a CellValue wrapper around the supplied ValueEval instance.
Parameters:
  eval -



getEvalForCell
protected static ValueEval getEvalForCell(HSSFCell cell, HSSFRow row, HSSFSheet sheet, HSSFWorkbook workbook)(Code)
Given a cell, find its type and from that create an appropriate ValueEval impl instance and return that. Since the cell could be an external reference, we need the sheet that this belongs to. Non existent cells are treated as empty.
Parameters:
  cell -
Parameters:
  sheet -
Parameters:
  workbook -



getEvalForPtg
protected static Eval getEvalForPtg(Ptg ptg)(Code)
returns an appropriate Eval impl instance for the Ptg. The Ptg must be one of: Area3DPtg, AreaPtg, ReferencePtg, Ref3DPtg, IntPtg, NumberPtg, StringPtg, BoolPtg
special Note: OperationPtg subtypes cannot be passed here!
Parameters:
  ptg -



getOperationEvalForPtg
protected static Eval getOperationEvalForPtg(OperationPtg ptg)(Code)
returns the OperationEval concrete impl instance corresponding to the suplied operationPtg
Parameters:
  ptg -



getUnderlyingParser
public static FormulaParser getUnderlyingParser(HSSFWorkbook workbook, String formula)(Code)
Returns an underlying FormulaParser, for the specified Formula String and HSSFWorkbook. This will allow you to generate the Ptgs yourself, if your needs are more complex than just having the formula evaluated.



inspectPtgs
void inspectPtgs(String formula)(Code)
debug method
Parameters:
  formula -
Parameters:
  sheet -
Parameters:
  workbook -



internalEvaluate
protected static ValueEval internalEvaluate(HSSFCell srcCell, HSSFRow srcRow, HSSFSheet sheet, HSSFWorkbook workbook)(Code)
Dev. Note: Internal evaluate must be passed only a formula cell else a runtime exception will be thrown somewhere inside the method. (Hence this is a private method.)
Parameters:
  srcCell -
Parameters:
  srcRow -
Parameters:
  sheet -
Parameters:
  workbook -



pushRef2DEval
protected static void pushRef2DEval(ReferencePtg ptg, Stack stack, HSSFCell cell, HSSFRow row, HSSFSheet sheet, HSSFWorkbook workbook)(Code)
create a Ref2DEval for ReferencePtg and push it on the stack. Non existent cells are treated as RefEvals containing BlankEval.
Parameters:
  ptg -
Parameters:
  stack -
Parameters:
  cell -
Parameters:
  sheet -
Parameters:
  workbook -



pushRef3DEval
protected static void pushRef3DEval(Ref3DPtg ptg, Stack stack, HSSFCell cell, HSSFRow row, HSSFSheet sheet, HSSFWorkbook workbook)(Code)
create a Ref3DEval for Ref3DPtg and push it on the stack.
Parameters:
  ptg -
Parameters:
  stack -
Parameters:
  cell -
Parameters:
  sheet -
Parameters:
  workbook -



setCurrentRow
public void setCurrentRow(HSSFRow row)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.