public interface Range
Modifier and Type | Interface and Description |
---|---|
static class |
Range.AutoFilterOperator
AutoFilterOperator attributes, that can be applied.
|
static class |
Range.DeleteShiftDirection
DeleteShiftDirection attributes, that can be applied.
|
static class |
Range.InsertFormatOrigin
InsertFormatOrigin attributes, that can be applied.
|
static class |
Range.InsertShiftDirection
InsertShiftDirection attributes, that can be applied.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Select a cell or cells with this range.
|
void |
applyAutoFilter(int field,
Object criteria1,
Range.AutoFilterOperator 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 |
applyDataValidation(DataValidation dataValidation)
Applies the data dataValidation
|
void |
applyFill(Fill fill)
Applies the fill to this range.
|
void |
applyFont(Font font)
Applies the font to this range.
|
void |
applyHorizontalAlignment(Alignment.Horizontal 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(Alignment.Vertical 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 |
clearDataValidation()
Clears the data validation
|
void |
clearFill()
Clears the fill
|
void |
clearFont()
Clears the font
|
Borders |
createBorders(Borders.BorderIndex borderIndex)
Creates the borders from the given border index.
|
CellStyle |
createCellStyle()
Creates a cell style object.
|
DataValidation |
createDataValidation()
Creates a data validation
|
Font |
createFont()
Creates a font
|
Fill.PatternFill |
createPatternFill()
Creates a pattern fill.
|
void |
delete(Range.DeleteShiftDirection 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(Range.InsertShiftDirection insertShiftDirection,
Range.InsertFormatOrigin insertFormatOrigin)
Insert cells to the range
|
CompletableFuture<CellStyle> |
loadCellStyle()
Loads the cell style from the remote data server.
|
CompletableFuture<DataValidation> |
loadDataValidation()
Loads the data validation 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(Alignment.Vertical alignment)
alignment
- either Alignment.Vertical.Top
, Alignment.Vertical.Center
,
Alignment.Vertical.Bottom
, Alignment.Vertical.Justify
, or Alignment.Vertical.Distributed
void applyHorizontalAlignment(Alignment.Horizontal alignment)
Borders createBorders(Borders.BorderIndex borderIndex)
Borders.BorderIndex.EdgeLeft
,
Borders.BorderIndex.EdgeTop
, and Borders.BorderIndex.EdgeBottom
,
Borders.BorderIndex.EdgeRight
)void applyBorders(Borders borders)
borders
- void clearBorders()
void applyWrapText(boolean wrapText)
wrapText
- void delete(Range.DeleteShiftDirection deleteShiftDirection)
deleteShiftDirection
- the shift direction when deleting. either Range.DeleteShiftDirection.ShiftUp
or Range.DeleteShiftDirection.ShiftToLeft
void insert(Range.InsertShiftDirection insertShiftDirection, Range.InsertFormatOrigin insertFormatOrigin)
insertShiftDirection
- the shift direction off original cells. Either
Range.InsertShiftDirection.ShiftDown
or
Range.InsertShiftDirection.ShiftToRight
insertFormatOrigin
- copy the format from nearby cells when inserting new cells. Either
Range.InsertFormatOrigin.LeftOrAbove
or
Range.InsertFormatOrigin.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, Range.AutoFilterOperator 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 Range.AutoFilterOperator.And
, Range.AutoFilterOperator.Bottom10Items
,
Range.AutoFilterOperator.Bottom10Percent
, Range.AutoFilterOperator.FilterCellColor
,
Range.AutoFilterOperator.FilterDynamic
, Range.AutoFilterOperator.FilterFontColor
,
Range.AutoFilterOperator.FilterIcon
, Range.AutoFilterOperator.FilterValues
,
Range.AutoFilterOperator.Top10Items
, or Range.AutoFilterOperator.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()
DataValidation createDataValidation()
void applyDataValidation(DataValidation dataValidation)
dataValidation
- void clearDataValidation()
CompletableFuture<DataValidation> loadDataValidation()
Copyright © 2017. All rights reserved.