public interface IWorksheet
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Makes the current sheet the active sheet.
|
IWorksheet |
copy()
Copies the sheet to the end of the current workbook.
|
IWorksheet |
copy(IWorkbook workbook)
Copies the sheet to the end of the specified workbook.
|
IWorksheet |
copyAfter(IWorksheet targetSheet)
Copies the sheet to the location after the specified sheet.
|
IWorksheet |
copyBefore(IWorksheet targetSheet)
Copies the sheet to the location before the specified sheet.
|
void |
delete()
Deletes the object.
|
java.lang.Object |
evaluate(java.lang.String formula)
Converts a Microsoft Excel name to an object or a value.
|
java.lang.Object |
evaluate(java.lang.String formula,
IFormulaResolver resolver) |
void |
freezePanes(int row,
int column)
Freezes panes at the specified position.
|
void |
freezeTrailingPanes(int row,
int column)
Freezes trailing panes at the specified position.
|
void |
fromJson(java.io.InputStream stream)
Generates a worksheet from the json stream.
|
void |
fromJson(java.io.InputStream stream,
DeserializationOptions deserializationOptions) |
void |
fromJson(java.lang.String json)
Generates a worksheet from the json string.
|
void |
fromJson(java.lang.String json,
DeserializationOptions deserializationOptions) |
Event<EventHandler<EventArgs>> |
getActivatedEvent()
Occurs when the worksheet is activated.
|
IRange |
getActiveCell()
Gets the active cell.
|
IPane |
getActivePane()
Returns the
IPane object that represents the active pane of the worksheet. |
IAutoFilter |
getAutoFilter()
Returns an
IAutoFilter object if filtering is on. |
boolean |
getAutoFilterMode()
Gets whether the AutoFilter drop-down arrows are currently displayed on the
sheet.
|
boolean |
getAutoGenerateColumns()
Gets whether to generate columns automatically while binding data.
|
byte[] |
getBackgroundPicture()
Gets the background graphic for this worksheet.
|
IBackgroundPictures |
getBackgroundPictures()
Returns a
IBackgroundPictures object that represents all the backgound pictures on the
worksheet or chart sheet. |
Event<EventHandler<EventArgs>> |
getBeforeDeleteEvent()
Occurs before the worksheet is deleted.
|
IRange |
getCells()
Returns the
IRange object that represents all the cells on the
worksheet (not just the cells that are currently in use). |
BaseCellType |
getCellType()
Gets the cell type for sheet.
|
Event<EventHandler<RangeEventArgs>> |
getChangedEvent()
Occurs when something changes in the cells.
|
int |
getColumnCount()
Gets the column count of the worksheet when exported to json.
|
IRange |
getColumns()
Returns the
IRange object that represents all the columns on the
specified worksheet. |
IComments |
getComments()
Returns the
IComments collection that represents all the comments for
the specified worksheet. |
ICommentsThreaded |
getCommentsThreaded()
Returns the
ICommentsThreaded collection that represents all the threaded comments for
the specified worksheet. |
IControlCollection |
getControls()
Gets the control collection of this worksheet.
|
java.lang.Object |
getDataSource()
Gets the data source of data binding for current sheet.
|
Event<EventHandler<EventArgs>> |
getDeactivatedEvent()
Occurs when the worksheet is deactivated.
|
boolean |
getFilterMode()
Gets whether the worksheet is in filter mode.
|
boolean |
getFixedPageBreaks()
Gets whether the horizontal and vertical page breaks are fixed when inserting/deleting rows/columns.
|
int |
getFreezeColumn()
Gets the frozen column.
|
int |
getFreezeRow()
Gets the frozen row.
|
int |
getFreezeTrailingColumn()
Gets the number of trailing frozen columns of the sheet.
|
int |
getFreezeTrailingRow()
Gets the number of trailing frozen rows of the sheet.
|
Color |
getFrozenLineColor()
Gets the color of frozen line.
|
IHPageBreaks |
getHPageBreaks()
Get the collection of horizontal page breaks within the print area.
|
IHyperlinks |
getHyperlinks()
Provides access to the collection of Hyperlinks contained in the worksheet.
|
int |
getIndex()
Gets the index number of the object within the collection of similar objects.
|
java.lang.String |
getName()
Gets the name of the object.
|
INames |
getNames()
Returns the
INames collection that represents all the
worksheet-specific names (names defined with the "WorksheetName!" prefix). |
IOutline |
getOutline()
Returns an
IOutline object that represents the outline for the
specified worksheet. |
IOutlineColumn |
getOutlineColumn()
Gets the outline column for the worksheet.
|
IPageSetup |
getPageSetup()
Returns a
IPageSetup object that contains all the page setup settings
for the specified object. |
IPanes |
getPanes()
Worksheet panes.
|
IPivotTables |
getPivotTables()
Returns an object that represents either a single PivotTable report a
IPivotTables object or a collection of all the PivotTables report
IPivotTables object on a worksheet. |
boolean |
getProtection()
Gets the protection status of the worksheet.
|
IProtectionSettings |
getProtectionSettings()
Returns the
IProtectionSettings object that represents the protection
options of the worksheet. |
IRange |
getRange(int row,
int column)
Gets the
IRange object with the specified row and column. |
IRange |
getRange(int row,
int column,
int rowCount,
int columnCount)
Gets the
IRange object with the specified row and column. |
IRange |
getRange(java.lang.String reference)
Gets the
IRange object with the specified reference. |
int |
getRowCount()
Gets the row count of the worksheet when exported to json.
|
IRange |
getRows()
Returns the
IRange object that represents all the rows on the
specified worksheet. |
IRange |
getSelection()
Gets the selection range.
|
Event<EventHandler<RangeEventArgs>> |
getSelectionChangeEvent()
Occurs when the selection changes on a worksheet.
|
IShapes |
getShapes()
Returns a
IShapes object that represents all the shapes on the
worksheet or chart sheet. |
IWorksheetView |
getSheetView()
Returns an object that represents the view settings of this worksheet.
|
boolean |
getShowColumnOutline()
Gets whether to display the column outline.
|
boolean |
getShowRowOutline()
Gets whether to display the row outline.
|
ISort |
getSort()
Returns the sorted values in the current worksheet.
|
int |
getSplitColumn()
Gets the split column.
|
int |
getSplitRow()
Gets the split row.
|
double |
getStandardHeight()
Gets the standard (default) height(in points) of all the rows in the worksheet in
points.
|
double |
getStandardHeightInPixel()
Gets the standard (default) height(in pixels) of all the rows in the worksheet in
points.
|
double |
getStandardWidth()
Gets the standard (default) width(in points) of all the columns in the worksheet.
|
double |
getStandardWidthInPixel()
Gets the standard (default) width(in pixels) of all the columns in the worksheet.
|
Color |
getTabColor()
Gets the primary color of the tab.
|
ITables |
getTables()
Returns a collection of
ITable objects in the worksheet. |
java.lang.Object |
getTag()
Gets the tag of sheet.
|
SheetType |
getType()
Gets the sheet's type.
|
IRange |
getUsedRange()
Gets the used range, its behavior is equivalent to getUsedRange(EnumSet.of(UsedRangeType.Axis, UsedRangeType.Data, UsedRangeType.Comment, UsedRangeType.Style, UsedRangeType.Merge))
|
IRange |
getUsedRange(java.util.EnumSet<UsedRangeType> type) |
Visibility |
getVisible()
Gets whether the object is visible.
|
IVPageBreaks |
getVPageBreaks()
Get the collection of vertical page breaks within the print area.
|
IWorkbook |
getWorkbook()
Returns the workbook.
|
IWorksheet |
move()
Moves the sheet to the end of the current workbook.
|
IWorksheet |
move(IWorkbook workbook)
Moves the sheet to the end of the specified workbook.
|
IWorksheet |
moveAfter(IWorksheet targetSheet)
Moves the sheet to the location after the specified sheet.
|
IWorksheet |
moveBefore(IWorksheet targetSheet)
Moves the sheet to the location before the specified sheet.
|
void |
protect()
Protects a worksheet so that it cannot be modified.
|
void |
protect(java.lang.String password)
Protects a worksheet so that it cannot be modified.
|
void |
save(java.io.OutputStream fileStream,
SaveFileFormat fileFormat)
Saves current worksheet to the specified format file stream.
|
void |
save(java.io.OutputStream fileStream,
SaveOptionsBase options)
Saves current worksheet to the specified file stream.
|
void |
save(java.lang.String fileName)
Saves current worksheet to the specified file.
|
void |
save(java.lang.String fileName,
SaveFileFormat fileFormat)
Saves current worksheet to the specified format file.
|
void |
save(java.lang.String fileName,
SaveOptionsBase options)
Saves current worksheet to the specified file.
|
void |
select()
Selects the object.
|
void |
select(boolean replace)
Selects the object.
|
void |
setAutoFilterMode(boolean value)
Sets whether the AutoFilter drop-down arrows are currently displayed on the
sheet.
|
void |
setAutoGenerateColumns(boolean value)
Sets whether to generate columns automatically while binding data.
|
void |
setBackgroundPicture(byte[] picture)
Sets the background graphic for this worksheet.
|
void |
setCellType(BaseCellType cellType)
Sets the cell type for sheet.
|
void |
setColumnCount(int value)
Sets the column count of the worksheet when exported to json.
|
void |
setDataSource(java.lang.Object value)
Sets the data source of data binding for current sheet.
|
void |
setFixedPageBreaks(boolean value)
Sets whether the horizontal and vertical page breaks are fixed when inserting/deleting rows/columns.
|
void |
setFrozenLineColor(Color value)
Sets the color of frozen line.
|
void |
setIndex(int value)
Sets the index number of the object within the collection of similar objects.
|
void |
setName(java.lang.String value)
Sets the name of the object.
|
void |
setProtection(boolean value)
Sets the protection status of the worksheet.
|
void |
setRowCount(int value)
Sets the row count of the worksheet when exported to json.
|
void |
setShowColumnOutline(boolean value)
Sets whether to display the column outline.
|
void |
setShowRowOutline(boolean value)
Sets whether to display the row outline.
|
void |
setStandardHeight(double value)
Sets the standard (default) height(in points) of all the rows in the worksheet in
points.
|
void |
setStandardHeightInPixel(double value)
Sets the standard (default) height(in pixels) of all the rows in the worksheet in
points.
|
void |
setStandardWidth(double value)
Sets the standard (default) width(in points) of all the columns in the worksheet.
|
void |
setStandardWidthInPixel(double value)
Sets the standard (default) width(in pixels) of all the columns in the worksheet.
|
void |
setTabColor(Color value)
Sets the primary color of the tab.
|
void |
setTag(java.lang.Object tag)
Sets the tag for sheet.
|
void |
setVisible(Visibility value)
Sets whether the object is visible.
|
void |
showAllData()
Makes all rows of the currently filtered list visible.
|
void |
splitPanes(int row,
int column)
Splits panes at the specified position.
|
void |
toImage(java.io.OutputStream stream,
ImageType imageType)
Saves the sheet to the specified image file.
|
void |
toImage(java.lang.String imageFile)
Saves the sheet to the specified image file.
|
java.lang.String |
toJson()
Generates a json string from the worksheet.
|
void |
toJson(java.io.OutputStream stream)
Generates a json stream from the worksheet.
|
void |
toJson(java.io.OutputStream stream,
SerializationOptions serializationOptions)
Generates a json stream from the worksheet.
|
java.lang.String |
toJson(SerializationOptions serializationOptions)
Generates a json string from the worksheet.
|
void |
unfreezePanes()
Unfreezes panes.
|
void |
unfreezeTrailingPanes()
Unfreezes trailing panes.
|
void |
unprotect()
Removes protection from the worksheet.
|
void |
unprotect(java.lang.String password)
Removes protection from the worksheet.
|
void |
unsplitPanes()
Unsplits panes.
|
Event<EventHandler<EventArgs>> getActivatedEvent()
Event<EventHandler<EventArgs>> getBeforeDeleteEvent()
Event<EventHandler<RangeEventArgs>> getChangedEvent()
Event<EventHandler<EventArgs>> getDeactivatedEvent()
Event<EventHandler<RangeEventArgs>> getSelectionChangeEvent()
IControlCollection getControls()
IWorksheetView getSheetView()
Visibility getVisible()
void setVisible(Visibility value)
IRange getActiveCell()
IAutoFilter getAutoFilter()
IAutoFilter object if filtering is on. Returns nothing if
filtering is off.boolean getAutoFilterMode()
void setAutoFilterMode(boolean value)
IRange getColumns()
IRange object that represents all the columns on the
specified worksheet.IRange getCells()
IRange object that represents all the cells on the
worksheet (not just the cells that are currently in use).IComments getComments()
IComments collection that represents all the comments for
the specified worksheet.ICommentsThreaded getCommentsThreaded()
ICommentsThreaded collection that represents all the threaded comments for
the specified worksheet.double getStandardWidth()
double getStandardWidthInPixel()
void setStandardWidth(double value)
void setStandardWidthInPixel(double value)
double getStandardHeight()
double getStandardHeightInPixel()
void setStandardHeight(double value)
void setStandardHeightInPixel(double value)
boolean getFilterMode()
IHyperlinks getHyperlinks()
int getIndex()
void setIndex(int value)
int getRowCount()
void setRowCount(int value)
int getColumnCount()
void setColumnCount(int value)
byte[] getBackgroundPicture()
void setBackgroundPicture(byte[] picture)
java.lang.String getName()
void setName(java.lang.String value)
INames getNames()
INames collection that represents all the
worksheet-specific names (names defined with the "WorksheetName!" prefix).IOutline getOutline()
IOutline object that represents the outline for the
specified worksheet.boolean getShowRowOutline()
void setShowRowOutline(boolean value)
boolean getShowColumnOutline()
void setShowColumnOutline(boolean value)
IPivotTables getPivotTables()
IPivotTables object or a collection of all the PivotTables report
IPivotTables object on a worksheet.IRange getRange(java.lang.String reference)
IRange object with the specified reference.reference - The reference.IRange getRange(int row, int column)
IRange object with the specified row and column.row - The row.column - The column.IRange getRange(int row, int column, int rowCount, int columnCount)
IRange object with the specified row and column.row - The row.column - The column.rowCount - The row count.columnCount - The column count.IRange getSelection()
IShapes getShapes()
IShapes object that represents all the shapes on the
worksheet or chart sheet.IBackgroundPictures getBackgroundPictures()
IBackgroundPictures object that represents all the backgound pictures on the
worksheet or chart sheet.ISort getSort()
Color getTabColor()
void setTabColor(Color value)
IWorkbook getWorkbook()
IProtectionSettings getProtectionSettings()
IProtectionSettings object that represents the protection
options of the worksheet.boolean getProtection()
void setProtection(boolean value)
IRange getRows()
IRange object that represents all the rows on the
specified worksheet.int getFreezeRow()
int getFreezeColumn()
Color getFrozenLineColor()
int getFreezeTrailingRow()
int getFreezeTrailingColumn()
void setFrozenLineColor(Color value)
int getSplitRow()
int getSplitColumn()
IPageSetup getPageSetup()
IPageSetup object that contains all the page setup settings
for the specified object.IHPageBreaks getHPageBreaks()
IVPageBreaks getVPageBreaks()
void select()
void select(boolean replace)
replace - True to replace the current selection with
the specified object.
False to extend the current selection to
include any previously selected objects and the specified object.void activate()
void delete()
java.lang.Object evaluate(java.lang.String formula)
formula - Required String. The name of the object, using the naming
convention.java.lang.Object evaluate(java.lang.String formula,
IFormulaResolver resolver)
formula - resolver - void showAllData()
IRange getUsedRange()
IRange getUsedRange(java.util.EnumSet<UsedRangeType> type)
type - The feature type.IRange object that represents the used range on the
specified worksheet.void freezePanes(int row,
int column)
row - The frozen row position.column - The frozen column position.void unfreezePanes()
void freezeTrailingPanes(int row,
int column)
row - The trailing frozen row position.column - The trailing frozen column position.void unfreezeTrailingPanes()
void splitPanes(int row,
int column)
row - The split row position.column - The split column position.void unsplitPanes()
IPanes getPanes()
IPane getActivePane()
IPane object that represents the active pane of the worksheet.void save(java.lang.String fileName)
fileName - The specified file name.void save(java.lang.String fileName,
SaveFileFormat fileFormat)
fileName - The specified file.fileFormat - The format of the file.void save(java.io.OutputStream fileStream,
SaveFileFormat fileFormat)
fileStream - The specified file stream.fileFormat - The format of the file stream.void save(java.lang.String fileName,
SaveOptionsBase options)
fileName - The specified file.options - The options of saving the file.void save(java.io.OutputStream fileStream,
SaveOptionsBase options)
fileStream - The specified file stream.options - The options of saving the file stream.boolean getFixedPageBreaks()
void setFixedPageBreaks(boolean value)
SheetType getType()
java.lang.Object getTag()
void setTag(java.lang.Object tag)
BaseCellType getCellType()
void setCellType(BaseCellType cellType)
java.lang.Object getDataSource()
void setDataSource(java.lang.Object value)
boolean getAutoGenerateColumns()
void setAutoGenerateColumns(boolean value)
IOutlineColumn getOutlineColumn()
IWorksheet copy()
IWorksheet copy(IWorkbook workbook)
workbook - Specifies the workbook to which the sheet will be copied.IWorksheet copyBefore(IWorksheet targetSheet)
targetSheet - The sheet before which the copied sheet will be placed. It can be the sheet of the same or another workbook.IWorksheet copyAfter(IWorksheet targetSheet)
targetSheet - The sheet after which the copied sheet will be placed. It can be the sheet of the same or another workbook.IWorksheet move()
IWorksheet move(IWorkbook workbook)
workbook - Specifies the workbook to which the sheet will be moved.IWorksheet moveBefore(IWorksheet targetSheet)
targetSheet - The sheet before which the moved sheet will be placed. It can be the sheet of the same or another workbook.IWorksheet moveAfter(IWorksheet targetSheet)
targetSheet - The sheet after which the moved sheet will be placed. It can be the sheet of the same or another workbook.java.lang.String toJson()
java.lang.String toJson(SerializationOptions serializationOptions)
serializationOptions - the SerializationOptions object.void toJson(java.io.OutputStream stream)
stream - the output stream.void toJson(java.io.OutputStream stream,
SerializationOptions serializationOptions)
stream - the output stream.serializationOptions - the SerializationOptions object.void fromJson(java.lang.String json)
json - the input json string.void fromJson(java.lang.String json,
DeserializationOptions deserializationOptions)
json - the input json string.deserializationOptions - the DeserializationOptions object.void fromJson(java.io.InputStream stream)
stream - the input json stream.void fromJson(java.io.InputStream stream,
DeserializationOptions deserializationOptions)
stream - the input json stream.deserializationOptions - the DeserializationOptions object.void toImage(java.lang.String imageFile)
imageFile - The output image file.void toImage(java.io.OutputStream stream,
ImageType imageType)
stream - The output image stream.imageType - Specifies the type of image to create.void protect()
void protect(java.lang.String password)
password - Password to protect the worksheet.void unprotect()
void unprotect(java.lang.String password)
password - Password to protect the worksheet.