|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.poi.hssf.usermodel.HSSFSheet
High level representation of a worksheet.
Field Summary | |
static int |
INITIAL_CAPACITY
Used for compile-time optimization. |
Constructor Summary | |
protected |
HSSFSheet(Workbook book)
Creates new HSSFSheet - called by HSSFWorkbook to create a sheet from scratch. |
protected |
HSSFSheet(Workbook book,
Sheet sheet)
Creates an HSSFSheet representing the given Sheet object. |
Method Summary | |
int |
addMergedRegion(Region region)
adds a merged region of cells (hence those cells form one) |
HSSFRow |
createRow(short rownum)
Create a new row within the sheet and return the high level representation |
boolean |
getAlternateExpression()
whether alternate expression evaluation is on |
boolean |
getAlternateFormula()
whether alternative formula entry is on |
boolean |
getAutobreaks()
show automatic page breaks or not |
short |
getColumnWidth(short column)
get the width (in units of 1/256th of a character width ) |
short |
getDefaultColumnWidth()
get the default column width for the sheet (if the columns do not define their own width) in characters |
short |
getDefaultRowHeight()
get the default row height for the sheet (if the rows do not define their own height) in twips (1/20 of a point) |
float |
getDefaultRowHeightInPoints()
get the default row height for the sheet (if the rows do not define their own height) in points. |
boolean |
getDialog()
get whether sheet is a dialog sheet or not |
boolean |
getDisplayGuts()
get whether to display the guts or not |
int |
getFirstRowNum()
gets the first row on the sheet |
boolean |
getFitToPage()
fit to page option is on |
int |
getLastRowNum()
gets the last row on the sheet |
Region |
getMergedRegionAt(int index)
gets the region at a particular index |
int |
getNumMergedRegions()
returns the number of merged regions |
int |
getPhysicalNumberOfRows()
Returns the number of phsyically defined rows (NOT the number of rows in the sheet) |
HSSFRow |
getRow(int rownum)
Returns the logical row (not physical) 0-based. |
boolean |
getRowSumsBelow()
get if row summaries appear below detail in the outline |
boolean |
getRowSumsRight()
get if col summaries appear right of the detail in the outline |
protected Sheet |
getSheet()
used internally in the API to get the low level Sheet record represented by this Object. |
boolean |
getVerticallyCenter(boolean value)
Determine whether printed output for this sheet will be vertically centered. |
boolean |
isGridsPrinted()
get whether gridlines are printed. |
void |
removeMergedRegion(int index)
removes a merged region of cells (hence letting them free) |
void |
removeRow(HSSFRow row)
Remove a row from this sheet. |
java.util.Iterator |
rowIterator()
|
void |
setAlternativeExpression(boolean b)
whether alternate expression evaluation is on |
void |
setAlternativeFormula(boolean b)
whether alternative formula entry is on |
void |
setAutobreaks(boolean b)
show automatic page breaks or not |
void |
setColumnWidth(short column,
short width)
set the width (in units of 1/256th of a character width) |
void |
setDefaultColumnWidth(short width)
set the default column width for the sheet (if the columns do not define their own width) in characters |
void |
setDefaultRowHeight(short height)
set the default row height for the sheet (if the rows do not define their own height) in twips (1/20 of a point) |
void |
setDefaultRowHeightInPoints(float height)
set the default row height for the sheet (if the rows do not define their own height) in points |
void |
setDialog(boolean b)
set whether sheet is a dialog sheet or not |
void |
setDisplayGuts(boolean b)
set whether to display the guts or not |
void |
setFitToPage(boolean b)
fit to page option is on |
void |
setGridsPrinted(boolean value)
set whether gridlines printed. |
void |
setRowSumsBelow(boolean b)
set if row summaries appear below detail in the outline |
void |
setRowSumsRight(boolean b)
set if col summaries appear right of the detail in the outline |
void |
setVerticallyCenter(boolean value)
determines whether the output is vertically centered on the page. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int INITIAL_CAPACITY
Constructor Detail |
protected HSSFSheet(Workbook book)
book
- - lowlevel Workbook object associated with the sheet.HSSFWorkbook.createSheet()
protected HSSFSheet(Workbook book, Sheet sheet)
book
- - lowlevel Workbook object associated with the sheet.sheet
- - lowlevel Sheet object this sheet will representHSSFWorkbook.createSheet()
Method Detail |
public HSSFRow createRow(short rownum)
rownum
- row numberHSSFRow
,
removeRow(HSSFRow)
public void removeRow(HSSFRow row)
row
- representing a row to remove.public HSSFRow getRow(int rownum)
rownum
- row to getpublic int getPhysicalNumberOfRows()
public int getFirstRowNum()
public int getLastRowNum()
public void setColumnWidth(short column, short width)
column
- - the column to set (0-based)width
- - the width in units of 1/256th of a character widthpublic short getColumnWidth(short column)
column
- - the column to set (0-based)public short getDefaultColumnWidth()
public short getDefaultRowHeight()
public float getDefaultRowHeightInPoints()
public void setDefaultColumnWidth(short width)
width
- default column widthpublic void setDefaultRowHeight(short height)
height
- default row heightpublic void setDefaultRowHeightInPoints(float height)
height
- default row heightpublic boolean isGridsPrinted()
public void setGridsPrinted(boolean value)
value
- false if not printed.public int addMergedRegion(Region region)
region
- (rowfrom/colfrom-rowto/colto) to mergepublic void setVerticallyCenter(boolean value)
value
- true to vertically center, false otherwise.public boolean getVerticallyCenter(boolean value)
public void removeMergedRegion(int index)
index
- of the region to unmergepublic int getNumMergedRegions()
public Region getMergedRegionAt(int index)
index
- of the region to fetchpublic java.util.Iterator rowIterator()
protected Sheet getSheet()
public void setAlternativeExpression(boolean b)
b
- alternative expression evaluation or notpublic void setAlternativeFormula(boolean b)
b
- alternative formulas or notpublic void setAutobreaks(boolean b)
b
- whether to show auto page breakspublic void setDialog(boolean b)
b
- isDialog or notpublic void setDisplayGuts(boolean b)
b
- guts or no guts (or glory)public void setFitToPage(boolean b)
b
- fit or notpublic void setRowSumsBelow(boolean b)
b
- below or notpublic void setRowSumsRight(boolean b)
b
- right or notpublic boolean getAlternateExpression()
public boolean getAlternateFormula()
public boolean getAutobreaks()
public boolean getDialog()
public boolean getDisplayGuts()
public boolean getFitToPage()
public boolean getRowSumsBelow()
public boolean getRowSumsRight()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |