|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.extentech.ExtenXLS.ColHandle
public class ColHandle
The ColHandle provides access to an Worksheet Column and its Cells.
Use the ColHandle to work with individual Columns in an XLS file.
With a ColHandle you can:
get a handle to the Cells in a columnNote: for a discussion of Column widths see: http://support.microsoft.com/?kbid=214123
set the default formatting for a column
WorkBookHandle,
WorkSheetHandle,
FormulaHandle| Field Summary | |
|---|---|
static int |
DEFAULT_COLWIDTH
|
| Method Summary | |
|---|---|
void |
autoFit()
resizes this column to fit the width of all displayed, non-wrapped text. |
boolean |
containsMergeRange()
determines if this Column passes through i.e. |
CellHandle[] |
getCells()
returns the array of Cells in this Column |
int |
getColFirst()
returns the first Column referenced by this column handle NOTE: A Column handle may in some circumstances refer to a range of columns |
int |
getColLast()
returns the last Column referenced by this column handle NOTE: A Column handle may in some circumstances refer to a range of columns |
FormatHandle |
getFormatHandle()
returns the FormatHandle (a Format Object describing visual properties) for this Column NOTE: The Column format record describes the default formatting for each cell contained within the column |
int |
getFormatId()
returns the format ID (the index to the format record) for this Column The Column format is the default formatting for each cell contained within the column |
int |
getOutlineLevel()
Returns the Outline level (depth) of this Column |
int |
getWidth()
returns the width of this Column in internal units defined as follows: default width of the columns in 1/256 of the width of the zero character, using default font. |
static int |
getWidth(com.extentech.formats.XLS.Boundsheet sheet,
int col)
static utility method to return the Column width of an existing column in the units as follows: default width of the columns in 1/256 of the width of the zero character, using default font. |
int |
getWidthInChars()
returns the width of this Column in Characters or regular Excel units NOTE: this value is a calculated value that should be close but still is an approximation of Excel units |
boolean |
isCollapsed()
returns true if this Column is collapsed |
boolean |
isHidden()
returns true if this Column is hidden |
void |
setCol(com.extentech.formats.XLS.Col c)
sets this ColHandle source Column |
void |
setCollapsed(boolean b)
sets whether to collapse this Column |
void |
setFormatId(int i)
sets the format id (an index to a Format record) for this Column This sets the default formatting for the Column such that any cell that does not specifically set it's own formatting will display this Column formatting |
void |
setHidden(boolean b)
sets whether to hide or show this Column |
void |
setOutlineLevel(int x)
Set the Outline level (depth) of this Column |
void |
setWidth(int newWidth)
sets the width of this Column in internal units, described as follows: default width of the columns in 1/256 of the width of the zero character, using default font. |
void |
setWidthInChars(int newWidth)
sets the width of this Column in Characters or Excel units. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_COLWIDTH
| Method Detail |
|---|
public void autoFit()
public void setCol(com.extentech.formats.XLS.Col c)
col - c - source Column objectpublic void setWidthInChars(int newWidth)
int - i - desired Column width in Characters (Excel units)public void setWidth(int newWidth)
NOTE: The last Cell in the column having its width set will be the resulting width of the column
int - i - desired Column width in internal unitspublic int getWidth()
public int getWidthInChars()
public static int getWidth(com.extentech.formats.XLS.Boundsheet sheet,
int col)
Boundsheet - sheet - source Worksheetint - col - 0-based Column number
public void setFormatId(int i)
int - i - ID representing the Format to set this ColumnFormatHandlepublic int getFormatId()
FormatHandlepublic FormatHandle getFormatHandle()
public int getColFirst()
public int getColLast()
public CellHandle[] getCells()
public boolean containsMergeRange()
public void setCollapsed(boolean b)
boolean - b - true to collapse this Columnpublic void setHidden(boolean b)
boolean - b - true to hide this Column, false to showpublic void setOutlineLevel(int x)
int - x - outline levelpublic int getOutlineLevel()
public boolean isCollapsed()
public boolean isHidden()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||