net.sf.jett.transform
Class SheetTransformer

java.lang.Object
  extended by net.sf.jett.transform.SheetTransformer

public class SheetTransformer
extends java.lang.Object

A SheetTransformer knows how to transform one Sheet in an Excel spreadsheet. For cell processing, it creates a Block representing the entire Sheet, then it delegates processing to a BlockTransformer. It is also responsible for gathering all Formulas at the beginning, and replacing all Formulas with Excel Formulas at the end. It also exposes the "sheet" object in the "beans" Map.

Author:
Randy Gettman

Constructor Summary
SheetTransformer()
           
 
Method Summary
 void gatherFormulas(org.apache.poi.ss.usermodel.Sheet sheet, java.util.Map<java.lang.String,Formula> formulaMap)
          Searches for all Formulas contained on the given Sheet.
 void replaceFormulas(org.apache.poi.ss.usermodel.Sheet sheet, WorkbookContext context)
          Replace all Formulas found in the given Sheet with Excel formulas.
 void transform(org.apache.poi.ss.usermodel.Sheet sheet, WorkbookContext context, java.util.Map<java.lang.String,java.lang.Object> beans)
          Transforms the given Sheet, using the given Map of bean names to bean objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SheetTransformer

public SheetTransformer()
Method Detail

transform

public void transform(org.apache.poi.ss.usermodel.Sheet sheet,
                      WorkbookContext context,
                      java.util.Map<java.lang.String,java.lang.Object> beans)
Transforms the given Sheet, using the given Map of bean names to bean objects.

Parameters:
sheet - The Sheet to transform.
context - The WorkbookContext.
beans - The beans map.

gatherFormulas

public void gatherFormulas(org.apache.poi.ss.usermodel.Sheet sheet,
                           java.util.Map<java.lang.String,Formula> formulaMap)
Searches for all Formulas contained on the given Sheet. Adds them to the given formula map.

Parameters:
sheet - The Sheet on which to search for Formulas.
formulaMap - A Map of strings to Formulas, with the keys of the format "sheetName!formulaText".

replaceFormulas

public void replaceFormulas(org.apache.poi.ss.usermodel.Sheet sheet,
                            WorkbookContext context)
Replace all Formulas found in the given Sheet with Excel formulas.

Parameters:
sheet - The Sheet.
context - The WorkbookContext.


Copyright © 2012-2013 Jett Team. All Rights Reserved.