com.quadrique.jbuildingblocks.core.io.file.parser.excel
Class JbbExcelFileParser
java.lang.Object
com.quadrique.jbuildingblocks.core.io.file.parser.excel.JbbExcelFileParser
public class JbbExcelFileParser
- extends Object
|
Field Summary |
static int |
INTEGER_MAPPING
Columns are referenced with an integer-based value that will be mapped to an index
(thanks to the IntLabeltoIndexMap member of the ExcelFileParser class) |
static int |
NO_MAPPING
Mapping constants: Columns are referenced with a zero-based integer value that will be used "as is" (i.e. |
static int |
STRING_MAPPING
Columns are referenced with a string-based value that will be mapped to an index
(thanks to the StringLabeltoIndexMap member of the ExcelFileParser class) |
NO_MAPPING
public static final int NO_MAPPING
- Mapping constants: Columns are referenced with a zero-based integer value that will be used "as is" (i.e. no mapping or translation)
- See Also:
- Constant Field Values
STRING_MAPPING
public static final int STRING_MAPPING
- Columns are referenced with a string-based value that will be mapped to an index
(thanks to the StringLabeltoIndexMap member of the ExcelFileParser class)
- See Also:
- Constant Field Values
INTEGER_MAPPING
public static final int INTEGER_MAPPING
- Columns are referenced with an integer-based value that will be mapped to an index
(thanks to the IntLabeltoIndexMap member of the ExcelFileParser class)
- See Also:
- Constant Field Values
newInstance
public static JbbExcelFileParser newInstance()
- Returns:
- a new instance
getIntMap
public JbbIntLabelToIndexMap getIntMap()
- Returns:
- Returns the intMap.
setIntMap
public void setIntMap(JbbIntLabelToIndexMap intMap)
- Parameters:
intMap - The intMap to set.
getMapping
public int getMapping()
- Returns:
- Returns the mapping.
setMapping
public void setMapping(int mapping)
- Parameters:
mapping - The mapping to set.
getStringMap
public JbbStringLabelToIndexMap getStringMap()
- Returns:
- Returns the stringMap.
setStringMap
public void setStringMap(JbbStringLabelToIndexMap stringMap)
- Parameters:
stringMap - The stringMap to set.
dump
public void dump(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int firstRow,
int lastRow,
int firstColumn,
int lastColumn,
boolean oneLinePerCell)
throws Exception
- Parameters:
sheet - firstRow - lastRow - firstColumn - lastColumn - oneLinePerCell -
- Throws:
Exception
getCellStringValue
public String getCellStringValue(org.apache.poi.hssf.usermodel.HSSFRow row,
String columnLabel)
throws Exception
- Parameters:
row - columnLabel - the label of the column (the column label to column index is defined thanks to the LabelToIndexMap)
- Returns:
- the value of the given cell as a String
- Throws:
Exception
getCellStringValue
public String getCellStringValue(org.apache.poi.hssf.usermodel.HSSFRow row,
int column)
throws Exception
- Parameters:
row - column - 0 based index of the column
- Returns:
- the value of the given cell as a String
- Throws:
Exception
getCellStringValue
public String getCellStringValue(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int rowNb,
int columnNb)
throws Exception
- Parameters:
sheet - rowNb - columnNb -
- Returns:
- the String value corresponding to the given cell
- Throws:
Exception
getINTEGER_MAPPING
public static int getINTEGER_MAPPING()
getNO_MAPPING
public static int getNO_MAPPING()
getSTRING_MAPPING
public static int getSTRING_MAPPING()
Copyright © 2001-2008 Quadrique Corporation. All Rights Reserved.