public interface Range
Modifier and Type | Method and Description |
---|---|
void |
activate()
Select a cell or cells with this range.
|
void |
applyAutoFilter(int field,
Object criteria1,
String operator,
Object criteria2,
boolean visibleDropDown)
Applies the auto filter to this range.
|
void |
applyBorders(Borders borders)
Applies the borders for this range.
|
void |
applyCellStyle(CellStyle cellStyle)
Applies the cell style to remote data server.
|
void |
applyColumnWidth(int width)
Applies the column width of this range in character unit width.
|
void |
applyColumnWidthPx(int width)
Applies the column width of this range in pixels.
|
void |
applyFill(Fill fill)
Applies the fill to this range.
|
void |
applyFont(Font font)
Applies the font to this range.
|
void |
applyHorizontalAlignment(String alignment)
Applies the horizontal alignment for the given range.
|
void |
applyNumberFormat(String format)
Applies the number format to this range.
|
void |
applyValue(Object value)
Applies the range value.
|
void |
applyValues(Object... values)
Applies the range values.
|
void |
applyVerticalAlignment(String alignment)
Applies the vertical alignment.
|
void |
applyWrapText(boolean wrapText)
Applies to enable or disable the wrap text.
|
void |
clearAutoFilter()
Clears the auto filter
|
void |
clearBorders()
Clears the borders for this range.
|
void |
clearCellStyle()
Clears the cell style.
|
void |
clearContents()
Clears formula/values of this range
|
void |
clearFill()
Clears the fill
|
void |
clearFont()
Clears the font
|
Borders |
createBorders(String borderIndex)
Creates the borders from the given border index.
|
CellStyle |
createCellStyle()
Creates a cell style object.
|
Font |
createFont()
Creates a font
|
Fill.PatternFill |
createPatternFill()
Creates a pattern fill.
|
void |
delete(String deleteShiftDirection)
Deletes cells of the range.
|
String |
getA1Notation()
Returns the A1 notation from this range.
|
Range |
getCell(int row,
int column) |
int |
getColumn()
Returns the left column position for this range.
|
Range |
getColumns()
Return the column part of this range.
|
Range |
getColumns(int index)
Returns a Range that is n-th column(0-based) related to the first area of
this range and in the range.
|
int |
getCount()
Returns the count of cells of this range.
|
int |
getLastColumn()
Returns the end column position for this range.
|
int |
getLastRow()
Returns the end row position for this range.
|
int |
getRow()
Returns the top row position for this range.
|
Range |
getRows()
Returns the row port of this range.
|
Range |
getRows(int index)
Returns a Range that is n-th row(0-based) related to the first area of
this range and in the range.
|
Spreadsheet |
getSpreadsheet() |
void |
insert(String insertShiftDirection,
String insertFormatOrigin)
Insert cells to the range
|
CompletableFuture<CellStyle> |
loadCellStyle()
Loads the cell style from the remote data server.
|
CompletableFuture<RangeValue> |
loadValue()
Returns the first range value from this range.
|
CompletableFuture<List<RangeValue>> |
loadValues()
Returns the range values from this range.
|
CompletableFuture<Workbook> |
loadWorkbook()
Returns the remote workbook which holds this range.
|
CompletableFuture<Worksheet> |
loadWorksheet()
Returns the remote worksheet which holds this range.
|
static final int MAX_COL
static final int MAX_ROW
Spreadsheet getSpreadsheet()
CompletableFuture<Workbook> loadWorkbook()
CompletableFuture<Worksheet> loadWorksheet()
CompletableFuture<RangeValue> loadValue()
CompletableFuture<List<RangeValue>> loadValues()
Range getCell(int row, int column)
String getA1Notation()
int getRow()
int getColumn()
int getLastRow()
int getLastColumn()
void applyValue(Object value)
value
- Number|Stringvoid applyValues(Object... values)
values
- a list of Number|Stringvoid applyVerticalAlignment(String alignment)
alignment
- either 'bottom', 'center', 'distributed', 'justify',
or 'top'void applyHorizontalAlignment(String alignment)
alignment
- either 'center', 'centerAcrossSelection', 'distributed',
'fill', 'general', 'justify', 'left'
or 'right'Borders createBorders(String borderIndex)
borderIndex
- either 'diagonalDown', 'diagonalUp', 'edgeBottom',
'edgeLeft', 'edgeRight', 'edgeTop', 'insideHorizontal',
or 'insideVertical'void applyBorders(Borders borders)
borders
- void clearBorders()
void applyWrapText(boolean wrapText)
wrapText
- void delete(String deleteShiftDirection)
deleteShiftDirection
- the shift direction when deleting. either 'shiftUp'
or 'shiftToLeft'void insert(String insertShiftDirection, String insertFormatOrigin)
insertShiftDirection
- the shift direction off original cells. Either 'shiftDown' or 'shiftToRight'insertFormatOrigin
- copy the format from nearby cells when inserting new cells. Either 'leftOrAbove' or 'rightOrBelow'void applyColumnWidth(int width)
width
- void applyColumnWidthPx(int width)
width
- void activate()
void clearContents()
Range getColumns()
getColumns(int)
Range getColumns(int index)
Range getRows()
getRows(int)
Range getRows(int index)
int getCount()
void applyAutoFilter(int field, Object criteria1, String operator, Object criteria2, boolean visibleDropDown)
field
- The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field onecriteria1
- The criteria (a string; for example, "101"). Use "=" to find blank fields, or use "<>" to find nonblank fields. If this argument is omitted, the criteria is All. If Operator is xlTop10Items, Criteria1 specifies the number of items (for example, "10").operator
- either 'and', 'bottom10Items', 'bottom10Percent', 'filterCellColor',
'filterDynamic', 'filterFontColor', 'filterIcon',
'filterValues', 'top10Items', or 'top10Percent'criteria2
- The second criteria (a string). Used with Criteria1 and Operator to construct compound criteria.visibleDropDown
- True to display the AutoFilter drop-down arrow for the filtered field. False to hide the AutoFilter drop-down arrow for the filtered field. True by default.void clearAutoFilter()
CompletableFuture<CellStyle> loadCellStyle()
CellStyle createCellStyle()
void applyCellStyle(CellStyle cellStyle)
cellStyle
- void clearCellStyle()
void applyNumberFormat(String format)
format
- Font createFont()
void applyFont(Font font)
font
- void clearFont()
Fill.PatternFill createPatternFill()
void applyFill(Fill fill)
fill
- void clearFill()
Copyright © 2017. All rights reserved.