public class SheetBuilder
extends java.lang.Object
SheetBuilder
provides an easy way of building workbook sheets
from 2D array of Objects. It can be used in test cases to improve code
readability or in Swing applications with tables.Constructor and Description |
---|
SheetBuilder(Workbook workbook,
java.lang.Object[][] cells) |
Modifier and Type | Method and Description |
---|---|
Sheet |
build()
Builds sheet from parent workbook and 2D array with cell
values.
|
boolean |
getCreateEmptyCells()
Returns
true if null array elements should be treated as empty
cells. |
SheetBuilder |
setCreateEmptyCells(boolean shouldCreateEmptyCells)
Specifies if null array elements should be treated as empty cells.
|
SheetBuilder |
setSheetName(java.lang.String sheetName)
Specifies name of the sheet to build.
|
public SheetBuilder(Workbook workbook, java.lang.Object[][] cells)
public boolean getCreateEmptyCells()
true
if null array elements should be treated as empty
cells.true
if null objects should be treated as empty cells
and false
otherwisepublic SheetBuilder setCreateEmptyCells(boolean shouldCreateEmptyCells)
shouldCreateEmptyCells
- true
if null array elements should be
treated as empty cellsthis
public SheetBuilder setSheetName(java.lang.String sheetName)
sheetName
- sheet name to usethis
public Sheet build()
java.util.Date
or java.util.Calendar
instances become date cells.Object.toString()
method call.Copyright © 2005-2010 Potix Corporation. All Rights Reserved.