public class RangeImpl extends Object implements Range, Serializable
isSheetProtected() and getSheetProtection(), you can handle
it easily.Range.ApplyBorderType, Range.AutoFillType, Range.AutoFilterOperation, Range.CellAttribute, Range.CellStyleHelper, Range.DeleteShift, Range.InsertCopyOrigin, Range.InsertShift, Range.PasteOperation, Range.PasteType, Range.SheetVisible, Range.SortDataOption, Range.SyncLevel| Constructor and Description |
|---|
RangeImpl(SRange range,
Book book) |
RangeImpl(SRange range,
Sheet sheet) |
| Modifier and Type | Method and Description |
|---|---|
Chart |
addChart(SheetAnchor anchor,
Chart.Type type,
Chart.Grouping grouping,
Chart.LegendPosition pos)
Adds chart to sheet
|
Picture |
addPicture(SheetAnchor anchor,
byte[] image,
Picture.Format format)
Adds picture to sheet
|
void |
applyAutoFilter()
re-apply existing criteria of filters
|
void |
applyBorders(Range.ApplyBorderType type,
CellStyle.BorderType borderType,
String htmlColor)
apply borders
|
void |
applyBordersAround(CellStyle.BorderType borderType,
String htmlColor) |
String |
asString()
get formatted string of this range
|
void |
autoFill(Range dest,
Range.AutoFillType fillType)
According to current range, fills data to destination range automatically
|
void |
clearAll()
Clears contents, styles and unmerge this range.
|
void |
clearContents()
Clears contents
|
void |
clearStyles()
Clears styles
|
Sheet |
cloneSheet(String name)
Clone this sheet; create a sheet and copy the contents of this sheet; then add to the end of the book.
|
Sheet |
cloneSheetFrom(String name,
Sheet sheet)
Clone from the specified source sheet to the owner book of this range.
|
void |
createName(String nameName)
Create a
Name that refer to this range. |
Sheet |
createSheet(String name)
Creates a new sheet
|
void |
delete(Range.DeleteShift shift)
Delete cells of the range.
|
void |
deleteChart(Chart chart)
Deletes chart
|
void |
deletePicture(Picture picture)
Deletes picture that in sheet
|
void |
deleteSheet()
Deletes sheet.
|
void |
deleteValidation()
Delete the
Validation associated in the specified range. |
void |
enableAutoFilter(boolean enable)
enable/disable autofilter of the sheet
|
void |
enableAutoFilter(int field,
Range.AutoFilterOperation filterOp,
Object criteria1,
Object criteria2,
Boolean showButton)
enable filter with condition
|
boolean |
equals(Object obj) |
void |
fillDown()
Fills cells by copying from first/top row data
|
void |
fillLeft()
Fills cells by copying from last/right column data
|
void |
fillRight()
Fills cells by copying from first/left column data
|
void |
fillUp()
Fills cells by copying from bottom row data
|
Range |
findAutoFilterRange()
To find a range of cells for applying auto filter according to this range.
|
Book |
getBook()
Gets the book of this range
|
CellData |
getCellData()
Gets the first cell(top-left) data of this range
|
String |
getCellDataFormat()
Gets the first cell(top-left) format of this range
|
String |
getCellEditText()
Gets the first cell(top-left) edit text of this range
|
String |
getCellFormatText()
Gets the first cell(top-left) formatted text of this range
|
Hyperlink |
getCellHyperlink()
Gets the first cell(top-left)
Hyperlink object of this range. |
String |
getCellRichText()
Returns text in html format; null if not a rich text.
|
CellStyle |
getCellStyle()
get the first cell style of this range
|
Range.CellStyleHelper |
getCellStyleHelper()
Gets cell-style-helper, this helper helps you to create new style, font or color
|
Object |
getCellValue()
Gets the first cell(top-left) value of this this range
|
int |
getColumn()
Gets the left column of this range
|
int |
getColumnCount()
Gets the column count of this range
|
String |
getCommentRichText()
Return the comment rich edit text of the left top cell of this Range.
|
CellRegion |
getDataRegion()
Returns the region which contains data(including chart, picture, and
fills) in the sheet of this Range; return null if empty sheet.
|
SRange |
getInternalRange()
Get internal range implementation
|
int |
getLastColumn()
Gets the right/last column of this range
|
int |
getLastRow()
Gets the bottom/last row of this range
|
RangeImpl |
getLeftTop()
get the top-left cell range of this range
|
ReadWriteLock |
getLock() |
CellRegion |
getMergedRegion()
Returns the merged region of the left top cell of this Range if any;
otherwise, returns null if not a merged region.
|
SRange |
getNative() |
Font |
getOrCreateFont(Font.Boldweight boldweight,
Color color,
int fontHeight,
String fontName,
boolean italic,
boolean strikeout,
Font.TypeOffset typeOffset,
Font.Underline underline)
Get font if exists or create font if not exists from the book of this
range and return it.
|
int |
getRow()
Gets the top row of this range
|
int |
getRowCount()
Gets the row count of this range
|
Sheet |
getSheet()
Gets the sheet of this range
|
String |
getSheetName()
Gets the sheet name
|
int |
getSheetOrder()
Gets the sheet order
|
SheetProtection |
getSheetProtection()
Gets
SheetProtection which tells what are allowed operations for
a protected sheet of this range. |
List<Validation> |
getValidations()
Gets read only
Validation associated with the left-top cell
of this range; return null if no associated validation. |
int |
hashCode() |
boolean |
hasMergedCell() |
void |
insert(Range.InsertShift shift,
Range.InsertCopyOrigin copyOrigin)
Insert new cells to the area of this range.
To insert a row, you have to call Range.toRowRange() first, to insert a column, you have to call Range.toColumnRange() first. |
boolean |
isAnyCellProtected() |
boolean |
isAutoFilterEnabled()
check if auto filter is enable or not.
|
boolean |
isCommentVisible()
Returns whether the comment is always visible at the left top cell of
this range; if no comment at the cell, it returns false.
|
boolean |
isDisplaySheetGridlines() |
boolean |
isMergedCell() |
boolean |
isProtected() |
boolean |
isSheetProtected() |
boolean |
isWholeColumn()
Check if this range represents a whole column, which mean all rows are included,
|
boolean |
isWholeRow()
Check if this range represents a whole row, which mean all column are included,
|
boolean |
isWholeSheet()
Check if this range represents a whole sheet, which mean all column and row are included,
|
void |
merge(boolean across)
Merges the range
|
void |
moveChart(SheetAnchor anchor,
Chart chart)
Moves chart to new location
|
void |
movePicture(SheetAnchor anchor,
Picture picture)
Moves picture
|
void |
notifyChange()
Notify this range has been changed.
|
void |
notifyChange(Range.CellAttribute cellAttr)
Notify this range has been changed on the specifield attribute.
|
void |
notifyChange(String[] variables)
Notify the whole book of specified variables change.
|
Range |
paste(Range dest)
Pastes to destination
|
Range |
paste(Range dest,
boolean cut)
Cut and paste to destination
|
Range |
pasteSpecial(Range dest,
Range.PasteType type,
Range.PasteOperation op,
boolean skipBlanks,
boolean transpose)
Pastes to destination
|
void |
protectSheet(SheetProtection protection)
Protect a
Sheet so that it cannot be modified. |
void |
protectSheet(String password)
Deprecated.
|
void |
protectSheet(String password,
boolean allowSelectingLockedCells,
boolean allowSelectingUnlockedCells,
boolean allowFormattingCells,
boolean allowFormattingColumns,
boolean allowFormattingRows,
boolean allowInsertColumns,
boolean allowInsertRows,
boolean allowInsertingHyperlinks,
boolean allowDeletingColumns,
boolean allowDeletingRows,
boolean allowSorting,
boolean allowFiltering,
boolean allowUsingPivotTables,
boolean drawingObjects,
boolean scenarios)
Protect a
Sheet so that it cannot be modified. |
void |
refresh(boolean includeDependants)
Enforce evaluation(if not cached) and refresh UI of this range and its
dependent cells if the includeDependents is true.
|
void |
refresh(boolean includeDependants,
boolean clearCache,
boolean enforceEval)
Update data model and refresh UI of this range and its dependent cells
if the argument includeDependents is true.
|
void |
resetAutoFilter()
clear criteria of all filters, show all the data
|
boolean |
setAutoRefresh(boolean auto)
Turn on(true)/off(false) of auto refresh of this range and return
previous on/off status; default is true.
|
void |
setCellEditText(String editText)
Sets cell editText, applies it to all cells of this range
|
void |
setCellHyperlink(Hyperlink.HyperlinkType type,
String address,
String display)
Sets cell hyperlink, applies it too all cells
|
void |
setCellRichText(String html)
Set into the left top cell of this Range the specified text in html format.
|
void |
setCellStyle(CellStyle nstyle)
Sets cell style, applies it to all cells of this range
|
void |
setCellValue(Object value)
Sets cell data value, applies it to all cells
|
void |
setColumnWidth(int widthPx)
Sets the width(in pixel) of column in this range, it effect to whole column.
|
void |
setCommentRichText(String html)
Set comment rich text into the left top cell of this range; null to
delete it.
|
void |
setCommentVisible(boolean visible)
Set comment visibility into the left top cell of this range; if no
comment at the cell, it simply ignored.
|
void |
setDisplaySheetGridlines(boolean enable)
Displays sheet grid-lines or not
|
void |
setFreezePanel(int rowfreeze,
int columnfreeze)
Set the freeze panel
|
void |
setHidden(boolean hidden)
Hide or unhide rows or columns.
To hide/unhide a row, you have to call Range.toRowRange() first, to hide/un-hide a column, you have to call Range.toColumnRange()
or a whole column range. |
void |
setNameName(String namename,
String newname)
Set(Rename) the name of the Name(or Table) as specified in this
Range(a Book or a Sheet).
|
void |
setRowHeight(int heightPx)
Sets the height(in pixel) of row in this range, it effect to whole row.
|
void |
setRowHeight(int heightPx,
boolean isCustom)
Sets the height(in pixel) of row in this range and specify it's custom size or not.
|
void |
setSheetName(String name)
Sets the sheet name
|
void |
setSheetOrder(int pos)
Sets the sheet order
|
void |
setSheetVisible(Range.SheetVisible visible)
Setup sheet's visibility; can be VISIBLE, HIDDEN, or VERY_HIDDEN.
|
void |
setStringValue(String text)
Save the specified value into this range as a String no matter the value
is prefixed with '=' or not.
|
void |
setSyncLevel(Range.SyncLevel syncLevel)
Deprecated.
since 3.5 it is always synchronized on book by a read write lock.
|
void |
setValidation(Validation.ValidationType validationType,
boolean ignoreBlank,
Validation.OperatorType operatorType,
boolean inCellDropDown,
String formula1,
String formula2,
boolean showInput,
String inputTitle,
String inputMessage,
boolean showError,
Validation.AlertStyle alertStyle,
String errorTitle,
String errorMessage)
Add if not exist or modify an existing
Validation to this range. |
void |
shift(int rowOffset,
int colOffset)
shift this range with a offset row and column
|
void |
sort(boolean desc)
Sort range
|
void |
sort(boolean desc,
boolean hasHeader,
boolean matchCase,
boolean sortByRows,
Range.SortDataOption dataOption)
Sort range
|
void |
sort(Range key1,
boolean desc1,
Range.SortDataOption dataOption1,
Range key2,
boolean desc2,
Range.SortDataOption dataOption2,
Range key3,
boolean desc3,
Range.SortDataOption dataOption3,
boolean header,
boolean matchCase,
boolean sortByRows)
Sort range
|
void |
sync(RangeRunner run)
Runs runer under synchronization protection
|
RangeImpl |
toCellRange(int rowOffset,
int colOffset)
Returns a new range having on cell according to the offset
|
RangeImpl |
toColumnRange()
Return a range that represents all rows and between the first-column and last-column of this range
|
RangeImpl |
toRowRange()
Return a range that represents all columns and between the first-row and last-row of this range
|
RangeImpl |
toShiftedRange(int rowOffset,
int colOffset)
Return a new range that shift it row and column according to the offset, but has same height and width of original range.
|
String |
toString() |
void |
unmerge()
Unmerge the range
|
boolean |
unprotectSheet(String password)
Removes protection from a sheet.
|
void |
updateChart(Chart chart)
Notify the component that a chart has change, e.g.
|
Validation |
validate(String editText)
validate the user's input.
|
void |
visit(CellVisitor visitor)
visit all cells in this range, make sure you call this in a limited range,
don't use it for all row/column selection, it will spend much time to iterate the cell
|
public void setSyncLevel(Range.SyncLevel syncLevel)
RangesetSyncLevel in interface Rangepublic ReadWriteLock getLock()
public Range.CellStyleHelper getCellStyleHelper()
RangegetCellStyleHelper in interface Rangepublic CellData getCellData()
RangegetCellData in interface Rangepublic SRange getNative()
public boolean isProtected()
isProtected in interface Rangepublic boolean isSheetProtected()
isSheetProtected in interface Rangepublic boolean isAnyCellProtected()
public Range paste(Range dest, boolean cut)
Rangepublic Range pasteSpecial(Range dest, Range.PasteType type, Range.PasteOperation op, boolean skipBlanks, boolean transpose)
RangepasteSpecial in interface Rangedest - the destinationtype - the paste typeop - the paste operationskipBlanks - skip blanks or nottranspose - transpose the cell or notpublic void clearContents()
RangeclearContents in interface Rangepublic void clearAll()
Rangepublic Sheet getSheet()
Rangepublic void clearStyles()
RangeclearStyles in interface Rangepublic void setCellStyle(CellStyle nstyle)
RangesetCellStyle in interface Rangenstyle - new cell styleRange.getCellStyleHelper(),
Range.getCellStyle()public int getColumn()
Rangepublic int getRow()
Rangepublic int getLastColumn()
RangegetLastColumn in interface Rangepublic int getLastRow()
RangegetLastRow in interface Rangepublic void sync(RangeRunner run)
Rangesync in interface Rangerun - the runnerRange.setSyncLevel(SyncLevel)public void visit(CellVisitor visitor)
visit in interface Rangevisitor - the visitorRange.setSyncLevel(SyncLevel)public void applyBordersAround(CellStyle.BorderType borderType, String htmlColor)
public void applyBorders(Range.ApplyBorderType type, CellStyle.BorderType borderType, String htmlColor)
RangeapplyBorders in interface Rangetype - the apply typeborderType - the border typehtmlColor - the color (#rgb-hex-code, e.x #FF00FF)public boolean hasMergedCell()
hasMergedCell in interface Rangepublic boolean isMergedCell()
isMergedCell in interface Rangepublic CellRegion getMergedRegion()
RangegetMergedRegion in interface Rangepublic CellRegion getDataRegion()
RangegetDataRegion in interface Rangepublic void merge(boolean across)
Rangepublic void unmerge()
Rangepublic RangeImpl toShiftedRange(int rowOffset, int colOffset)
RangetoShiftedRange in interface RangerowOffset - row offset of the new range, zero basecolOffset - column offset of the new range, zero basepublic RangeImpl toCellRange(int rowOffset, int colOffset)
RangetoCellRange in interface RangerowOffset - row offset of the cell, zero basecolOffset - column offset of the cell, zero basepublic RangeImpl getLeftTop()
public RangeImpl toRowRange()
toRowRange in interface Rangepublic RangeImpl toColumnRange()
toColumnRange in interface Rangepublic boolean isWholeColumn()
isWholeColumn in interface Rangepublic boolean isWholeRow()
isWholeRow in interface Rangepublic boolean isWholeSheet()
isWholeSheet in interface Rangepublic void insert(Range.InsertShift shift, Range.InsertCopyOrigin copyOrigin)
RangeRange.toRowRange() first, to insert a column, you have to call Range.toColumnRange() first.public void delete(Range.DeleteShift shift)
RangeRange.toRowRange() first, to delete a column, you have to call Range.toColumnRange() first.public void sort(boolean desc)
Rangepublic void sort(boolean desc,
boolean hasHeader,
boolean matchCase,
boolean sortByRows,
Range.SortDataOption dataOption)
Rangepublic void sort(Range key1, boolean desc1, Range.SortDataOption dataOption1, Range key2, boolean desc2, Range.SortDataOption dataOption2, Range key3, boolean desc3, Range.SortDataOption dataOption3, boolean header, boolean matchCase, boolean sortByRows)
Rangesort in interface Rangekey1 - the sort index 1desc1 - true for descent, false for ascent of index 1dataOption1 - data option 1 for sortkey2 - the sort index 2desc2 - true for descent, false for ascent of index 2dataOption2 - data option 2 for sortkey3 - the sort index 3desc3 - true for descent, false for ascent of index 3dataOption3 - data option31 for sortheader - includes header or notmatchCase - matches character chase of notsortByRows - sorts by row or notpublic boolean isAutoFilterEnabled()
isAutoFilterEnabled in interface Rangepublic Range findAutoFilterRange()
RangefindAutoFilterRange in interface Rangepublic void enableAutoFilter(boolean enable)
enableAutoFilter in interface Rangeenable - true to enablepublic void enableAutoFilter(int field,
Range.AutoFilterOperation filterOp,
Object criteria1,
Object criteria2,
Boolean showButton)
enableAutoFilter in interface Rangefield - the filed index (according to current range, 1 base)filterOp - auto filter operationcriteria1 - criteria for autofiltercriteria2 - criteria for autofiltershowButton - true/false for show/hide dropdown button, null will keep the original setting.public void resetAutoFilter()
resetAutoFilter in interface Rangepublic void applyAutoFilter()
applyAutoFilter in interface Range@Deprecated public void protectSheet(String password)
protectSheet in interface Rangepublic void autoFill(Range dest, Range.AutoFillType fillType)
Rangepublic void fillDown()
Rangepublic void fillLeft()
Rangepublic void fillUp()
Rangepublic void fillRight()
Rangepublic void shift(int rowOffset,
int colOffset)
public String getCellEditText()
RangegetCellEditText in interface RangeCellData.getEditText()public void setCellEditText(String editText)
RangesetCellEditText in interface RangeeditText - the eidtText, it could be a string, integer string, date string or a formula (start with '=')public String getCellFormatText()
RangegetCellFormatText in interface RangeCellData.getFormatText()public String getCellDataFormat()
RangegetCellDataFormat in interface Rangepublic Object getCellValue()
RangegetCellValue in interface RangeCellData.getValue()public void setDisplaySheetGridlines(boolean enable)
RangesetDisplaySheetGridlines in interface Rangeenable - true to displaypublic boolean isDisplaySheetGridlines()
isDisplaySheetGridlines in interface Rangepublic void setHidden(boolean hidden)
RangeRange.toRowRange() first, to hide/un-hide a column, you have to call Range.toColumnRange()
or a whole column range.public void setCellHyperlink(Hyperlink.HyperlinkType type, String address, String display)
RangesetCellHyperlink in interface Rangetype - the hyperlink typeaddress - the address, e.x http://www.zkoss.orgdisplay - the label to displaypublic Hyperlink getCellHyperlink()
RangeHyperlink object of this range.getCellHyperlink in interface Rangepublic void setSheetName(String name)
RangesetSheetName in interface Rangename - new sheet name, it must be not same as another sheet name in it's owner book.public String getSheetName()
RangegetSheetName in interface Rangepublic void setSheetOrder(int pos)
RangesetSheetOrder in interface Rangepos - the positionpublic int getSheetOrder()
RangegetSheetOrder in interface Rangepublic void setCellValue(Object value)
RangesetCellValue in interface Rangevalue - the cell value, could be null, String, Number, Date or Booleanpublic CellStyle getCellStyle()
getCellStyle in interface Rangepublic Picture addPicture(SheetAnchor anchor, byte[] image, Picture.Format format)
RangeaddPicture in interface Rangeanchor - the anchor for pictureimage - the image binary arrayformat - the image formatpublic void deletePicture(Picture picture)
RangedeletePicture in interface Rangepublic void movePicture(SheetAnchor anchor, Picture picture)
RangemovePicture in interface Rangeanchor - the anchor to re-allocatepicture - the picture to re-allocatepublic Chart addChart(SheetAnchor anchor, Chart.Type type, Chart.Grouping grouping, Chart.LegendPosition pos)
Rangepublic void deleteChart(Chart chart)
RangedeleteChart in interface Rangechart - the chart to deletepublic void moveChart(SheetAnchor anchor, Chart chart)
Rangepublic void updateChart(Chart chart)
RangeupdateChart in interface Rangechart - the chart that contains changepublic Sheet createSheet(String name)
RangecreateSheet in interface Rangename - the sheet name, it must not be same as another sheet name in book of this rangepublic Sheet cloneSheet(String name)
RangecloneSheet in interface Rangename - the sheet name, it must not be the same as another sheet name in book of this rangepublic void deleteSheet()
RangedeleteSheet in interface Rangepublic void setColumnWidth(int widthPx)
RangesetColumnWidth in interface RangewidthPx - width in pixelRange.toColumnRange()public void setRowHeight(int heightPx)
RangesetRowHeight in interface RangeheightPx - height in pixelRange.toRowRange()public void setRowHeight(int heightPx,
boolean isCustom)
RangesetRowHeight in interface RangeheightPx - height in pixelisCustom - true if it's set by users manually, false if it's determined by the system automaticallypublic void notifyChange()
notifyChange in interface Rangepublic void notifyChange(String[] variables)
RangenotifyChange in interface Rangevariables - changed variablespublic void setFreezePanel(int rowfreeze,
int columnfreeze)
RangesetFreezePanel in interface Rangerowfreeze - the number of row to freeze, 0 means no freezecolumnfreeze - the number of column to freeze, 0 means no freezepublic int getRowCount()
RangegetRowCount in interface Rangepublic int getColumnCount()
RangegetColumnCount in interface Rangepublic String asString()
Rangepublic SRange getInternalRange()
RangegetInternalRange in interface Rangepublic void createName(String nameName)
RangeName that refer to this range.createName in interface RangenameName - name of the Name that you can refer in formulas.public void protectSheet(String password, boolean allowSelectingLockedCells, boolean allowSelectingUnlockedCells, boolean allowFormattingCells, boolean allowFormattingColumns, boolean allowFormattingRows, boolean allowInsertColumns, boolean allowInsertRows, boolean allowInsertingHyperlinks, boolean allowDeletingColumns, boolean allowDeletingRows, boolean allowSorting, boolean allowFiltering, boolean allowUsingPivotTables, boolean drawingObjects, boolean scenarios)
RangeSheet so that it cannot be modified. You can call
this method on a protected sheet to change its allowed options if the
same password is supplied; otherwise, it is ignored. A protected sheet
can be unprotected by calling Range.unprotectSheet(String password).
change the protection options; make sure provideprotectSheet in interface Rangepassword - a case-sensitive password for the sheet; null or empty string means protect the sheet without password.allowSelectingLockedCells - true to allow select locked cells; default to true.allowSelectingUnlockedCells - true to allow select unlocked cells; default to true.allowFormattingCells - true to allow user to format any cell on the protected sheet; default false.allowFormattingColumns - true to allow user to format any columns on the protected sheet; default false.allowFormattingRows - true to allow user to format any rows on the protected sheet; default false.allowInsertColumns - true to allow user to insert columns on the protected sheet; default false.allowInsertRows - true to allow user to insert rows on the protected sheet; default false.allowInsertingHyperlinks - true to allow user to insert hyperlinks on the protected sheet; default false.allowDeletingColumns - true to allow user to delete columns on the protected sheet; default false.allowDeletingRows - true to allow user to delete rows on the protected sheet; default false.allowSorting - true to allow user to sort on the protected sheet; default false.allowFiltering - true to allow user to set filters on the protected sheet; default false.allowUsingPivotTables - true to allow user to use pivot table reports on the protected sheet; default false.drawingObjects - true to protect objects; default to false.scenarios - true to protect scenarios; default to true.Range.unprotectSheet(String password),
Range.isProtected()public void protectSheet(SheetProtection protection)
RangeSheet so that it cannot be modified.protectSheet in interface RangeSheetProtectionpublic boolean unprotectSheet(String password)
RangeunprotectSheet in interface Rangepassword - a case-sensitive password used to unprotect the sheet. If
the sheet isn't protected with a password, this argument is ignored. If you
omit this argument for a sheet that is protected with a password, you'll
be prompted for the password.public SheetProtection getSheetProtection()
RangeSheetProtection which tells what are allowed operations for
a protected sheet of this range.getSheetProtection in interface Rangepublic Validation validate(String editText)
Rangepublic void setValidation(Validation.ValidationType validationType, boolean ignoreBlank, Validation.OperatorType operatorType, boolean inCellDropDown, String formula1, String formula2, boolean showInput, String inputTitle, String inputMessage, boolean showError, Validation.AlertStyle alertStyle, String errorTitle, String errorMessage)
RangeValidation to this range.
There are two ways to input list items for data validation in argument
"formula1" and "formula2". One is to specify a range via a formula such
as "=A1:A4" where the values in the cells of the range is the constrained
value list; another is to input literally the constrained value list
delimited by comma such as "1, 2, 3, 4". Note that when you input a
formula, must lead the formula with an equal sign('=').setValidation in interface RangevalidationType - the type of this validationignoreBlank - true if blank values are permitted.operatorType - the operator for this validationinCellDropDown - true if want to display dropdown list for acceptable values.formula1 - the value or expression associated with conditional format or data validation.formula2 - the 2nd part of a conditional format or data validation. Useful only when operatorType is BETWEEN or NOT_BETWEEN.showInput - true to show the input message.inputTitle - title for the data-validation input dialog box.inputMessage - message for the data-validation input dialog box.showError - true to show the error message.alertStyle - validation alert style.errorTitle - title of the data validation error dialog.errorMessage - data validation error message.public List<Validation> getValidations()
RangeValidation associated with the left-top cell
of this range; return null if no associated validation.public void deleteValidation()
RangeValidation associated in the specified range.deleteValidation in interface Rangepublic void setCellRichText(String html)
RangesetCellRichText in interface Rangepublic String getCellRichText()
RangegetCellRichText in interface Rangepublic Font getOrCreateFont(Font.Boldweight boldweight, Color color, int fontHeight, String fontName, boolean italic, boolean strikeout, Font.TypeOffset typeOffset, Font.Underline underline)
RangegetOrCreateFont in interface Rangepublic void refresh(boolean includeDependants)
RangeRange.refresh(boolean includeDependents, boolean false, boolean true).public boolean setAutoRefresh(boolean auto)
RangesetAutoRefresh in interface Rangeauto - whether refresh automaticallypublic void refresh(boolean includeDependants,
boolean clearCache,
boolean enforceEval)
Rangepublic void setSheetVisible(Range.SheetVisible visible)
RangesetSheetVisible in interface RangeRange.SheetVisiblepublic String getCommentRichText()
RangegetCommentRichText in interface Rangepublic void setCommentRichText(String html)
RangesetCommentRichText in interface Rangepublic void setCommentVisible(boolean visible)
RangesetCommentVisible in interface Rangepublic boolean isCommentVisible()
RangeisCommentVisible in interface Rangepublic void notifyChange(Range.CellAttribute cellAttr)
RangenotifyChange in interface Rangepublic void setNameName(String namename, String newname)
RangesetNameName in interface Rangenamename - name of the Name(or Table)newname - new name for the Name(or Table)public void setStringValue(String text)
RangesetStringValue in interface Rangepublic Sheet cloneSheetFrom(String name, Sheet sheet)
RangecloneSheetFrom in interface Rangename - the name of the new created sheet; null would try to use
the sheet name of the specified source sheet; if the same sheet name
already used in the owner book of this range then use default "SheetX"
name where X is the next sheet number of the owner book of this range.sheet - the source sheet to clone from to the owner book of this
range.Copyright © 2020. All rights reserved.