public class RangeImpl extends Object implements SRange, Serializable
SRange.ApplyBorderType, SRange.AutoFilterOperation, SRange.DeleteShift, SRange.FillType, SRange.InsertCopyOrigin, SRange.InsertShift, SRange.PasteOperation, SRange.PasteType, SRange.SheetVisible, SRange.SortDataOption
Constructor and Description |
---|
RangeImpl(SBook book) |
RangeImpl(SSheet sheet) |
RangeImpl(SSheet sheet,
CellRegion region) |
RangeImpl(SSheet sheet,
int row,
int col) |
RangeImpl(SSheet sheet,
int tRow,
int lCol,
int bRow,
int rCol) |
Modifier and Type | Method and Description |
---|---|
SChart |
addChart(ViewAnchor anchor,
SChart.ChartType type,
SChart.ChartGrouping grouping,
SChart.ChartLegendPosition pos,
boolean isThreeD)
Add a chart into the sheet of this Range
|
SPicture |
addPicture(ViewAnchor anchor,
byte[] image,
SPicture.Format format)
Add a picture into the sheet of this Range
|
void |
applyAutoFilter()
Apply the autofilter with the old condition and current cell values
|
void |
clearAll()
Clear data contains, style and unmerge this range
|
void |
clearCellStyles()
Clear the cell styles of this Range
|
void |
clearContents()
Clears the data from this Range.
|
SSheet |
cloneSheet(String name)
Clone sheet as specified in this Range.
|
SSheet |
cloneSheetFrom(String name,
SSheet sheet)
Clone from the specified source sheet to the owner book of this range.
|
SRange |
copy(SRange dstRange)
Copy data from this range to the specified destination range.
|
SRange |
copy(SRange dstRange,
boolean cut)
cut the selected range and paste to destination range.
|
void |
createName(String nameName)
Create a
SName that refer to this range. |
SSheet |
createSheet(String name)
Create sheet of this book as specified in this Range.
|
void |
delete(SRange.DeleteShift shift)
Delete cells of this Range.
|
void |
deleteChart(SChart chart)
Delete an existing chart from the sheet of this Range.
|
void |
deletePicture(SPicture picture)
Delete an existing picture from the sheet of this Range.
|
void |
deleteSheet()
Delete sheet of this Range.
|
void |
deleteValidation()
Delete the
SDataValidation associated in the specified range. |
SAutoFilter |
enableAutoFilter(boolean enable)
Enable the auto filter and return it, get null if you disable it.
|
SAutoFilter |
enableAutoFilter(int field,
SAutoFilter.FilterOp filterOp,
Object criteria1,
Object criteria2,
Boolean visibleDropDown)
Filters a list specified by this Range and returns an AutoFilter object.
|
void |
fill(SRange dstRange,
SRange.FillType fillType)
Perform an auto fill on the specified destination Range.
|
void |
fillDown()
Fills down from the top cells of this Range to the rest of this Range.
|
void |
fillLeft()
Fills left from the rightmost cells of this Range to the rest of this Range.
|
void |
fillRight()
Fills right from the leftmost cells of this Range to the rest of this Range.
|
void |
fillUp()
Fills up from the bottom cells of this Range to the rest of this Range.
|
SRange |
findAutoFilterRange()
To find a range of cells for applying auto filter according to this range.
|
String |
getCellDataFormat()
Gets the first(top-left) cell's format,
if the cell's format is the special LOCALE aware format (such as m/d/yyyy),
it transfer the format by LOCALE(e.g m/d/yyyy will transfer to yyyy/m/d in TW locale)
|
String |
getCellFormatText()
Gets the first(top-left) cell's formatted text,
if the cell's format is the special LOCALE aware format (such as m/d/yyyy),
it will formats the value by transferred format (e.g m/d/yyyy will transfer to yyyy/m/d in TW locale)
|
SCellStyle |
getCellStyle()
Gets the first(top-left) cell's style
|
int |
getColumn()
Returns the number of the 1st column of the 1st area in this Range(0-based; i.e.
|
SRange |
getColumns()
Returns a
SRange that represent columns of the 1st selected area 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.
|
String |
getEditText()
Return the edit text of this Range.
|
SHyperlink |
getHyperlink()
Returns the hyperlink of this Range.
|
int |
getLastColumn()
Returns the number of the last column of the 1st area in this Range(0-based; i.e.
|
int |
getLastRow()
Returns the number of the last row of the 1st area in this Range(0-based; i.e.
|
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 |
getOffset(int rowOffset,
int colOffset)
Returns a
SRange that represents a range that offset from this Range. |
SFont |
getOrCreateFont(SFont.Boldweight boldweight,
String htmlColor,
int fontHeight,
String fontName,
boolean italic,
boolean strikeout,
SFont.TypeOffset typeOffset,
SFont.Underline underline)
Get font if exists or create font if not exists from the book of this
range and return it.
|
String |
getRichText()
Return the rich edit text of the left top cell of this Range.
|
int |
getRow()
Returns the number of the 1st row of the 1st area in this Range(0-based; i.e.
|
SRange |
getRows()
Returns a
SRange that represent rows of the 1st selected area of this Range. |
SSheet |
getSheet()
Returns associate
SSheet of this range. |
SSheetProtection |
getSheetProtection()
Gets
SSheetProtection protection options that tells what are
allowed operations for the protected sheet of the first region of this
range. |
List<SDataValidation> |
getValidations()
Gets
SDataValidation s associated with this range; if more than
one validation is present, will return at most two. |
Object |
getValue()
Returns left top cell value of this Range.
|
void |
insert(SRange.InsertShift shift,
SRange.InsertCopyOrigin copyOrigin)
Insert cells of this Range.
|
boolean |
isAnyCellProtected()
Returns whether any cell is protected and locked in this Range.
|
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 |
isProtected()
Gets the first region's protection status; return true if the sheet of
the first region is protected and some cells in the region is locked.
|
boolean |
isSheetProtected()
Gets whether the sheet of the first region of this Range is protected.
|
boolean |
isWholeColumn()
Check if this range cover an entire columns (form 0, and last row to the max available column of a sheet)
|
boolean |
isWholeRow()
Check if this range cover an entire rows (form 0, and last row to the max available row of a sheet)
|
boolean |
isWholeSheet()
Check if this range cover an entire sheet
|
void |
merge(boolean across)
Merge cells of this range into a merged cell.
|
void |
move(int nRow,
int nCol)
Move this range to a new place as specified by row offset (negative value to move up;
positive value to move down) and column offset(negative value to move left; positive value to move right)
|
void |
moveChart(SChart chart,
ViewAnchor anchor)
Move the chart to the new anchor.
|
void |
movePicture(SPicture picture,
ViewAnchor anchor)
Update picture anchor.
|
void |
notifyChange()
Notify this range has been changed.
|
void |
notifyChange(CellAttribute cellAttr)
Notify this range has been changed with the specified attribute.
|
void |
notifyChange(String[] variables)
Notify the variables in this range has been changed.
|
void |
notifyCustomEvent(String customEventName,
Object data,
boolean writelock)
Send a custom model event to all book's listener, the event name must not conflict with that in
ModelEvents |
SRange |
pasteSpecial(SRange dstRange,
SRange.PasteType pasteType,
SRange.PasteOperation pasteOp,
boolean skipBlanks,
boolean transpose)
Pastes to a destination Range from this range.
|
SRange |
pasteSpecial0(SRange dstRange,
PasteOption option) |
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)
Evaluate(if not cached), update data model, 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()
Reset the autofilter, clear the condition, shows all the hidden row
|
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 |
setBorders(SRange.ApplyBorderType borderType,
SBorder.BorderType lineStyle,
String color)
Adds/Remove border of all cells within this range upon the specified border type.
|
void |
setCellStyle(SCellStyle style)
Sets a Style object to this Range.
|
void |
setColumnWidth(int widthPx)
Sets column width in unit of pixel
|
void |
setColumnWidth(int widthPx,
boolean custom)
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 |
setDisplayGridlines(boolean show)
Sets whether show the gridlines of the sheets in this Range.
|
void |
setEditText(String editText)
Set plain text as input by the end user.
|
void |
setFreezePanel(int numOfRow,
int numOfColumn)
Set the freeze panel
|
void |
setHidden(boolean hidden)
Sets whether this rows or columns are hidden(useful only if this Range cover entire column or entire row)
|
protected void |
setHiddenInLock(boolean hidden) |
void |
setHyperlink(SHyperlink.HyperlinkType linkType,
String address,
String display)
Sets the hyperlink of this 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 |
setRichText(String html)
Set rich text into the left top cell of this range.
|
void |
setRowHeight(int heightPx)
Sets row height in unit of pixel
|
void |
setRowHeight(int heightPx,
boolean custom)
Sets the height(in pixel) of row in this range, it effect to whole row.
|
void |
setSheetName(String newname)
Set(Rename) the name of the sheet as specified in this Range.
|
void |
setSheetOrder(int pos)
Sets the order of the sheet as specified in this Range.
|
void |
setSheetVisible(SRange.SheetVisible visible)
Set Sheet visibility; can be SheetVisible.VISIBLE, SheetVisible.HIDDEN,
and SheetVisible.VERY_HIDDEN.
|
void |
setStringValue(String value)
Save the specified value into this range as a String no matter the value
is prefixed with '=' or not.
|
void |
setValidation(SDataValidation.ValidationType validationType,
boolean ignoreBlank,
SDataValidation.OperatorType operatorType,
boolean inCellDropDown,
String formula1,
String formula2,
boolean showInput,
String inputTitle,
String inputMessage,
boolean showError,
SDataValidation.AlertStyle alertStyle,
String errorTitle,
String errorMessage)
Add if not exist or modify an existing
SDataValidation to this range. |
void |
setValue(Object value)
Set value into this Range.
|
void |
sort(SRange key1,
boolean descending1,
SRange.SortDataOption dataOption1,
SRange key2,
boolean descending2,
SRange.SortDataOption dataOption2,
SRange key3,
boolean descending3,
SRange.SortDataOption dataOption3,
int hasHeader,
boolean matchCase,
boolean sortByRows)
Sort this Range according the specified parameters
|
void |
unmerge()
Un-merge a merged cell in this range to separated cells.
|
boolean |
unprotectSheet(String password)
Removes protection from a sheet.
|
void |
updateChart(SChart chart)
Notify the model that a chart contains change, for example, chart data changes.
|
SDataValidation |
validate(String editText)
Returns whether the plain text input by the end user is valid or not;
note the validation only applies to the left-top cell of this Range.
|
public RangeImpl(SBook book)
public RangeImpl(SSheet sheet)
public RangeImpl(SSheet sheet, int row, int col)
public RangeImpl(SSheet sheet, int tRow, int lCol, int bRow, int rCol)
public RangeImpl(SSheet sheet, CellRegion region)
public ReadWriteLock getLock()
public SSheet getSheet()
SRange
SSheet
of this range.public int getRow()
SRange
public int getColumn()
SRange
public int getLastRow()
SRange
getLastRow
in interface SRange
public int getLastColumn()
SRange
getLastColumn
in interface SRange
public void setRichText(String html)
SRange
setRichText
in interface SRange
public String getRichText()
SRange
getRichText
in interface SRange
public void setValue(Object value)
SRange
public void clearContents()
SRange
clearContents
in interface SRange
public void clearCellStyles()
SRange
clearCellStyles
in interface SRange
public void clearAll()
SRange
public void setEditText(String editText)
SRange
setEditText
in interface SRange
editText
- the string input by the end user.public String getEditText()
SRange
getEditText
in interface SRange
public void notifyChange()
SRange
notifyChange
in interface SRange
public void notifyChange(CellAttribute cellAttr)
SRange
notifyChange
in interface SRange
public void notifyChange(String[] variables)
SRange
notifyChange
in interface SRange
public boolean isWholeSheet()
SRange
isWholeSheet
in interface SRange
public boolean isWholeRow()
SRange
isWholeRow
in interface SRange
public SRange getRows()
SRange
SRange
that represent rows of the 1st selected area of this Range. Note that only the 1st selected area is considered if this Range is a multiple-selected Range.public void setRowHeight(int heightPx)
SRange
setRowHeight
in interface SRange
public void setRowHeight(int heightPx, boolean custom)
SRange
setRowHeight
in interface SRange
custom
- mark it as custom value#toRowRange()
public boolean isWholeColumn()
SRange
isWholeColumn
in interface SRange
public SRange getColumns()
SRange
SRange
that represent columns of the 1st selected area of this Range. Note that only the 1st selected area is considered if this Range is a multiple-selected Range.getColumns
in interface SRange
SRange
that represent columns of this Range and contains all rows of the column.public void setColumnWidth(int widthPx)
SRange
setColumnWidth
in interface SRange
public void setColumnWidth(int widthPx, boolean custom)
SRange
setColumnWidth
in interface SRange
widthPx
- width in pixelcustom
- mark it as custom value#toColumnRange()
public SHyperlink getHyperlink()
SRange
getHyperlink
in interface SRange
public SRange copy(SRange dstRange, boolean cut)
SRange
public SRange copy(SRange dstRange)
SRange
public SRange pasteSpecial(SRange dstRange, SRange.PasteType pasteType, SRange.PasteOperation pasteOp, boolean skipBlanks, boolean transpose)
SRange
pasteSpecial
in interface SRange
dstRange
- the destination range to be pasted into.pasteType
- the part of the range to be pasted.pasteOp
- the paste operationskipBlanks
- true to not have blank cells in the ranage to paste into destination Range; default false.transpose
- true to transpose rows and columns when pasting to this range; default false.public SRange pasteSpecial0(SRange dstRange, PasteOption option)
public void insert(SRange.InsertShift shift, SRange.InsertCopyOrigin copyOrigin)
SRange
public void delete(SRange.DeleteShift shift)
SRange
public void merge(boolean across)
SRange
public void unmerge()
SRange
public void setBorders(SRange.ApplyBorderType borderType, SBorder.BorderType lineStyle, String color)
SRange
setBorders
in interface SRange
borderType
- one of SRange.ApplyBorderType
lineStyle
- border line style, one of SCellStyle.BorderStyle
color
- color in HTML format; i.e., #rrggbb.public void move(int nRow, int nCol)
SRange
public void setCellStyle(SCellStyle style)
SRange
setCellStyle
in interface SRange
style
- the style objectpublic SCellStyle getCellStyle()
SRange
getCellStyle
in interface SRange
public void fill(SRange dstRange, SRange.FillType fillType)
SRange
public void fillDown()
SRange
public void fillLeft()
SRange
public void fillRight()
SRange
public void fillUp()
SRange
public void setHidden(boolean hidden)
SRange
protected void setHiddenInLock(boolean hidden)
public void setDisplayGridlines(boolean show)
SRange
setDisplayGridlines
in interface SRange
show
- true to show the gridlines; false to not show the gridlines.@Deprecated public void protectSheet(String password)
protectSheet
in interface SRange
password
- to set for protection.public void setHyperlink(SHyperlink.HyperlinkType linkType, String address, String display)
SRange
setHyperlink
in interface SRange
linkType
- the type of target to link. One of the Hyperlink#LINK_URL
,
Hyperlink#LINK_DOCUMENT
, Hyperlink#LINK_EMAIL
, Hyperlink#LINK_FILE
address
- the addressdisplay
- the text to display linkpublic Object getValue()
SRange
public SRange getOffset(int rowOffset, int colOffset)
SRange
SRange
that represents a range that offset from this Range.getOffset
in interface SRange
rowOffset
- positive means downward; 0 means don't change row; negative means upward.colOffset
- positive means rightward; 0 means don't change column; negative means leftward.SRange
that represents a range that offset from this Range.public boolean isAnyCellProtected()
SRange
isAnyCellProtected
in interface SRange
public void deleteSheet()
SRange
deleteSheet
in interface SRange
public SSheet createSheet(String name)
SRange
createSheet
in interface SRange
name
- the name of the new created sheet; null would use default
"SheetX" name where X is the next sheet number.public SSheet cloneSheet(String name)
SRange
cloneSheet
in interface SRange
name
- the name of the new created sheet; null would use default
"SheetX" name where X is the next sheet number.public void setSheetName(String newname)
SRange
setSheetName
in interface SRange
public void setSheetOrder(int pos)
SRange
setSheetOrder
in interface SRange
pos
- the position that we want to insert the sheet into (0 based)public void setFreezePanel(int numOfRow, int numOfColumn)
SRange
setFreezePanel
in interface SRange
numOfRow
- the number of row to freeze, 0 means no freezenumOfColumn
- the number of column to freeze, 0 means no freezepublic String getCellFormatText()
SRange
getCellFormatText
in interface SRange
public String getCellDataFormat()
SRange
getCellDataFormat
in interface SRange
public boolean isSheetProtected()
SRange
isSheetProtected
in interface SRange
public SDataValidation validate(String editText)
SRange
public SRange findAutoFilterRange()
SRange
findAutoFilterRange
in interface SRange
Range.findAutoFilterRange()
public SAutoFilter enableAutoFilter(boolean enable)
SRange
enableAutoFilter
in interface SRange
public SAutoFilter enableAutoFilter(int field, SAutoFilter.FilterOp filterOp, Object criteria1, Object criteria2, Boolean visibleDropDown)
SRange
enableAutoFilter
in interface SRange
field
- offset of the field on which you want to base the filter on (1-based; i.e. leftmost column in this range is field 1).criteria1
- "=" to find blank fields, "<>" to find non-blank fields. If null, means ALL. If filterOp == AutoFilter#FILTEROP_TOP10,
then this shall specifies the number of items (e.g. "10").criteria2
- 2nd criteria; used with criteria1 and filterOP to construct compound criteria.visibleDropDown
- true to show the autoFilter drop-down arrow for the filtered field; false to hide the autoFilter drop-down arrow; null
to keep as is.public void resetAutoFilter()
SRange
resetAutoFilter
in interface SRange
public void applyAutoFilter()
SRange
applyAutoFilter
in interface SRange
public void notifyCustomEvent(String customEventName, Object data, boolean writelock)
SRange
ModelEvents
notifyCustomEvent
in interface SRange
customEventName
- the event custom eventdata
- the datawritelock
- use write lock when notify , set true if the synchronized book listener will modify the book.public SPicture addPicture(ViewAnchor anchor, byte[] image, SPicture.Format format)
SRange
addPicture
in interface SRange
public void deletePicture(SPicture picture)
SRange
deletePicture
in interface SRange
picture
- the picture to be deletedpublic void movePicture(SPicture picture, ViewAnchor anchor)
SRange
movePicture
in interface SRange
picture
- the picture to changeanchor
- the new anchorpublic SChart addChart(ViewAnchor anchor, SChart.ChartType type, SChart.ChartGrouping grouping, SChart.ChartLegendPosition pos, boolean isThreeD)
SRange
public void deleteChart(SChart chart)
SRange
deleteChart
in interface SRange
chart
- the chart to be deletedpublic void moveChart(SChart chart, ViewAnchor anchor)
SRange
public void updateChart(SChart chart)
SRange
updateChart
in interface SRange
chart
- the chart that changespublic void sort(SRange key1, boolean descending1, SRange.SortDataOption dataOption1, SRange key2, boolean descending2, SRange.SortDataOption dataOption2, SRange key3, boolean descending3, SRange.SortDataOption dataOption3, int hasHeader, boolean matchCase, boolean sortByRows)
SRange
sort
in interface SRange
key1
- key1 for sortingdescending1
- true to do descending sort; false to do ascending sort for key1.dataOption1
- see numeric String as number or not for key1.key2
- key2 for sortingdescending2
- true to do descending sort; false to do ascending sort for key2.dataOption2
- see numeric String as number or not for key2.key3
- key3 for sortingdescending3
- true to do descending sort; false to do ascending sort for key3.dataOption3
- see numeric String as number or not for key3.hasHeader
- whether sort range includes headermatchCase
- true to match the string cases; false to ignore string casessortByRows
- true to sort by rows(change columns orders); false to sort by columns(change row orders).public void createName(String nameName)
SRange
SName
that refer to this range.createName
in interface SRange
nameName
- name of the SName
that you can refer in formulas.public boolean isProtected()
SRange
isProtected
in interface SRange
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)
SRange
Sheet
so that it cannot be modified.protectSheet
in interface SRange
password
- a case-sensitive password for the sheet; null means sheet is not password protected.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.public boolean unprotectSheet(String password)
SRange
unprotectSheet
in interface SRange
password
- 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 SSheetProtection getSheetProtection()
SRange
SSheetProtection
protection options that tells what are
allowed operations for the protected sheet of the first region of this
range.getSheetProtection
in interface SRange
public void setValidation(SDataValidation.ValidationType validationType, boolean ignoreBlank, SDataValidation.OperatorType operatorType, boolean inCellDropDown, String formula1, String formula2, boolean showInput, String inputTitle, String inputMessage, boolean showError, SDataValidation.AlertStyle alertStyle, String errorTitle, String errorMessage)
SRange
SDataValidation
to this range.setValidation
in interface SRange
validationType
- 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<SDataValidation> getValidations()
SRange
SDataValidation
s associated with this range; if more than
one validation is present, will return at most two.getValidations
in interface SRange
#setValidation(ValidationType, boolean, OperatorType, boolean, String, String, boolean, String, String, boolean, AlertStyle, String, String)
public void deleteValidation()
SRange
SDataValidation
associated in the specified range.deleteValidation
in interface SRange
public SFont getOrCreateFont(SFont.Boldweight boldweight, String htmlColor, int fontHeight, String fontName, boolean italic, boolean strikeout, SFont.TypeOffset typeOffset, SFont.Underline underline)
SRange
getOrCreateFont
in interface SRange
public void refresh(boolean includeDependants)
SRange
public void refresh(boolean includeDependants, boolean clearCache, boolean enforceEval)
SRange
public boolean setAutoRefresh(boolean auto)
SRange
setAutoRefresh
in interface SRange
auto
- whether refresh automaticallypublic void setSheetVisible(SRange.SheetVisible visible)
SRange
setSheetVisible
in interface SRange
SRange.SheetVisible
public void setCommentRichText(String html)
SRange
setCommentRichText
in interface SRange
public String getCommentRichText()
SRange
getCommentRichText
in interface SRange
public void setCommentVisible(boolean visible)
SRange
setCommentVisible
in interface SRange
public boolean isCommentVisible()
SRange
isCommentVisible
in interface SRange
public void setNameName(String namename, String newname)
SRange
setNameName
in interface SRange
namename
- name of the Name(or Table)newname
- new name for the Name(or Table)public void setStringValue(String value)
SRange
setStringValue
in interface SRange
public CellRegion getMergedRegion()
SRange
getMergedRegion
in interface SRange
public CellRegion getDataRegion()
SRange
getDataRegion
in interface SRange
public SSheet cloneSheetFrom(String name, SSheet sheet)
SRange
cloneSheetFrom
in interface SRange
name
- 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.