|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jniwrapper.win32.jexcel.Worksheet
public class Worksheet
This class provides functionality for working with an Excel worksheet.
Method Summary | |
---|---|
void |
activate()
Activates the worksheet. |
void |
addWorksheetEventListener(WorksheetEventListener eventListener)
Adds the listener of worksheet events. |
void |
clear()
Clears all cells of the worksheet. |
void |
deleteColumn(Range column)
Deletes specified column |
void |
deleteColumn(java.lang.String column)
Deletes specified column. |
void |
deleteRow(int rowIndex)
Deletes specified row. |
void |
deleteRow(Range row)
Deletes specified row. |
void |
displayHeadings(boolean visible)
Allows hide and display worksheet headings. |
boolean |
equals(java.lang.Object obj)
|
void |
fillWithArray(Cell startCell,
java.util.Date[][] content)
Fills range, starting at given cell with given array. |
void |
fillWithArray(Cell startCell,
double[][] content)
Fills range, starting at given cell with given array. |
void |
fillWithArray(Cell startCell,
long[][] content)
Fills range, starting at given cell with given array. |
void |
fillWithArray(Cell startCell,
java.lang.String[][] content)
Fills range, starting at given cell with given array. |
void |
fillWithArray(java.lang.String range,
java.util.Date[][] content)
Fills range with given array. |
void |
fillWithArray(java.lang.String range,
java.util.Date[][] content,
java.text.DateFormat dateFormat)
Fills range with given array. |
void |
fillWithArray(java.lang.String range,
double[][] content)
Fills range with given array. |
void |
fillWithArray(java.lang.String range,
long[][] content)
Fills range with given array. |
void |
fillWithArray(java.lang.String range,
java.lang.String[][] content)
Fills range with given array. |
void |
fillWithArray(java.lang.String range,
com.jniwrapper.win32.automation.types.Variant[][] content)
Fills range with given array. |
Application |
getApplication()
Returns the application object. |
Cell |
getCell(int row,
int column)
Returns an instance of the Cell class that represents the specified cell. |
Cell |
getCell(java.lang.String cell)
Returns an instance of the Cell class that represents the specified cell. |
Range |
getColumn(java.lang.String column)
Returns the Range that contains all cells of the specified column. |
Range |
getColumns(java.lang.String[] columns)
Returns the Range that contains all cells of the specified columns. |
int |
getIndex()
Returns the index of the worksheet. |
java.lang.String |
getName()
Returns the name of the worksheet. |
com.jniwrapper.win32.automation.OleMessageLoop |
getOleMessageLoop()
Returns the message loop thread for processing native peer function calls. |
Workbook |
getParent()
Returns the parent workbook. |
com.jniwrapper.win32.excel._Worksheet |
getPeer()
Returns the appropriate native peer. |
Range |
getRange(java.lang.String range)
Creates an instance of the Range class that contains cells of the specified range. |
Range |
getRow(int row)
Returns the Range that contains all cells of the specified row. |
Range |
getRows(int[] rows)
Returns the Range that contains all cells of the specified rows. |
Range |
getUsedRange()
Returns the Range that contains used cells of the worksheet. |
void |
insertColumnAfter(Range column)
Inserts new empty column after specified column. |
void |
insertColumnAfter(java.lang.String column)
Inserts new empty column after specified column |
void |
insertColumnBefore(Range column)
Inserts new empty column before specified column. |
void |
insertColumnBefore(java.lang.String column)
Inserts new empty column before specified column. |
void |
insertRowAfter(int rowIndex)
Inserts new empty row after specified row. |
void |
insertRowAfter(Range row)
Inserts new empty row after specified row. |
void |
insertRowBefore(int rowIndex)
Inserts new empty row before specified row. |
void |
insertRowBefore(Range row)
Inserts new empty row before specified row. |
boolean |
isAutoDelete()
|
boolean |
isVisible()
Returns true if the worksheet is visible. |
void |
print(int copies)
Prints the specified number of copies of the worksheet. |
void |
protect(java.lang.String password)
Protects worksheet by password. |
void |
recalculateAllFormulas()
Recalculates all formulas. |
void |
release()
Releases this wrapper object. |
void |
removeEventHandler()
Removes the handler of worksheet events. |
void |
removeWorksheetEventListener(WorksheetEventListener eventListener)
Removes the specified listener of worksheet events. |
Range |
selectAll()
Returns the Range that contains all cells of the worksheet. |
void |
setAutoDelete(boolean value)
|
void |
setEventHandler(WorksheetEventHandler eventHandler)
Specifies the handler of worksheet events. |
void |
setName(java.lang.String name)
Changes the name of the worksheet. |
protected void |
setOleMessageLoop(com.jniwrapper.win32.automation.OleMessageLoop oleMessageLoop)
|
void |
setVisible(boolean visible)
Shows or hides the worksheet. |
java.lang.String |
toString()
|
void |
unprotect(java.lang.String password)
Unprotects worksheet by password. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void setName(java.lang.String name)
name
- is a new worksheet name.
java.lang.IllegalArgumentException
- if the name is null
.public java.lang.String getName()
public int getIndex()
public void print(int copies) throws javax.print.PrintException
copies
- is the number of copies to be printed.
java.lang.IllegalArgumentException
- if the number of copies is negative.
javax.print.PrintException
- if print problems occured.public void protect(java.lang.String password)
password
- protection passwordpublic void unprotect(java.lang.String password)
password
- protection passwordpublic void clear()
public void setVisible(boolean visible)
visible
- if true
the worksheet becomes visible.public void displayHeadings(boolean visible)
visible
- - specifies displaying statepublic boolean isVisible()
true
if the worksheet is visible.
true
if the worksheet is visible.public Workbook getParent()
public void activate()
public void recalculateAllFormulas()
public void setEventHandler(WorksheetEventHandler eventHandler)
eventHandler
- public void removeEventHandler()
public void addWorksheetEventListener(WorksheetEventListener eventListener)
eventListener
- public void removeWorksheetEventListener(WorksheetEventListener eventListener)
eventListener
- is the listener to be removed.public Range selectAll()
Range
that contains all cells of the worksheet.
Range
that contains all cells of the worksheet.public Range getUsedRange()
Range
that contains used cells of the worksheet.
Range
that contains used cells of the worksheet.public void fillWithArray(Cell startCell, java.lang.String[][] content) throws java.lang.IndexOutOfBoundsException
startCell
- specifies the top-left cell of the range that should be filled with given arraycontent
- array with values
java.lang.IndexOutOfBoundsException
public void fillWithArray(java.lang.String range, java.lang.String[][] content) throws java.lang.IndexOutOfBoundsException
range
- specifies range to be filledcontent
- array with values
java.lang.IndexOutOfBoundsException
public void fillWithArray(java.lang.String range, com.jniwrapper.win32.automation.types.Variant[][] content) throws java.lang.IndexOutOfBoundsException
range
- specifies range to be filledcontent
- array with values
java.lang.IndexOutOfBoundsException
public void fillWithArray(Cell startCell, double[][] content) throws java.lang.IndexOutOfBoundsException
startCell
- specifies the top-left cell of the range that should be filled with given arraycontent
- array with values
java.lang.IndexOutOfBoundsException
public void fillWithArray(java.lang.String range, double[][] content) throws java.lang.IndexOutOfBoundsException
range
- specifies range to be filledcontent
- array with values
java.lang.IndexOutOfBoundsException
public void fillWithArray(Cell startCell, long[][] content) throws java.lang.IndexOutOfBoundsException
startCell
- specifies the top-left cell of the range that should be filled with given arraycontent
- array with values
java.lang.IndexOutOfBoundsException
public void fillWithArray(java.lang.String range, long[][] content) throws java.lang.IndexOutOfBoundsException
range
- specifies range to be filledcontent
- array with values
java.lang.IndexOutOfBoundsException
public void fillWithArray(Cell startCell, java.util.Date[][] content) throws java.lang.IndexOutOfBoundsException
startCell
- specifies the top-left cell of the range that should be filled with given arraycontent
- array with values
java.lang.IndexOutOfBoundsException
public void fillWithArray(java.lang.String range, java.util.Date[][] content, java.text.DateFormat dateFormat) throws java.lang.IndexOutOfBoundsException
range
- specifies range to be filledcontent
- array with values
java.lang.IndexOutOfBoundsException
public void fillWithArray(java.lang.String range, java.util.Date[][] content) throws java.lang.IndexOutOfBoundsException
range
- specifies range to be filledcontent
- array with values
java.lang.IndexOutOfBoundsException
public Range getColumn(java.lang.String column)
Range
that contains all cells of the specified column.
column
- specifies the column.
Range
that contains all cells of the specified column.
java.lang.IllegalArgumentException
- if the target column is null
or
Excel unable to get the specified column.public Range getColumns(java.lang.String[] columns)
Range
that contains all cells of the specified columns.
columns
- specifies the columns.
Range
that contains all cells of the specified columns.
java.lang.IllegalArgumentException
- the columns argument is null
or
Excel unable to get any of columns.public Range getRow(int row)
Range
that contains all cells of the specified row.
row
- specifies the row.
Range
that contains all cells of the specified row.
java.lang.IllegalArgumentException
- if the row argument is negative or
Excel unable to get the specified row.public Range getRows(int[] rows)
Range
that contains all cells of the specified rows.
rows
- specifies the rows.
Range
that contains all cells of the specified rows.
java.lang.IllegalArgumentException
- if the rows argument is null
or
Excel unable to get any of rows.public Range getRange(java.lang.String range)
Range
class that contains cells of the specified range.
range
- is a string representation of a range of cells or a name of a named range.
Range
class that contains cells of the specified range.
java.lang.IllegalArgumentException
- if the range value is null
or illegal.public Cell getCell(java.lang.String cell)
Cell
class that represents the specified cell.
cell
- specifies the cell.
Cell
class that represents the specified cell.
java.lang.IllegalArgumentException
- if the cell value is null
or illegal.public Cell getCell(int row, int column)
Cell
class that represents the specified cell.
row
- specifies the row index.column
- specifies the column name.
Cell
class that represents the specified cell.
java.lang.IndexOutOfBoundsException
- if any index is non-positive or illegal.public void insertRowBefore(int rowIndex)
rowIndex
- index of row before which empty row will be inserted.public void insertRowAfter(int rowIndex)
rowIndex
- index of row after which empty row will be inserted.public void insertRowBefore(Range row)
row
- specifies the row before which empty row will be inserted.public void insertRowAfter(Range row)
row
- specifies the row after which empty row will be inserted.public void insertColumnBefore(java.lang.String column)
column
- index of column before which empty column will be inserted.public void insertColumnAfter(java.lang.String column)
column
- index of column after which empty column will be inserted.public void insertColumnBefore(Range column)
column
- specifies the column before which empty column will be inserted.public void insertColumnAfter(Range column)
column
- specifies the column after which empty column will be inserted.public void deleteColumn(java.lang.String column)
column
- index of column which will be deleted.public void deleteColumn(Range column)
column
- specifies the column which will be deleted.public void deleteRow(int rowIndex)
rowIndex
- index of row which will be deleted.public void deleteRow(Range row)
row
- specifies the row which will be deleted.public com.jniwrapper.win32.excel._Worksheet getPeer()
public void release()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public Application getApplication()
public com.jniwrapper.win32.automation.OleMessageLoop getOleMessageLoop()
protected void setOleMessageLoop(com.jniwrapper.win32.automation.OleMessageLoop oleMessageLoop)
public void setAutoDelete(boolean value)
setAutoDelete
in interface com.jniwrapper.AutoDeleteParameter
public boolean isAutoDelete()
isAutoDelete
in interface com.jniwrapper.AutoDeleteParameter
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |