Range class

Represent the Range

Constructors

Range(Worksheet worksheet)
Create an instance of class

Properties

addressGlobal → String
Gets the Range reference along with its sheet name in format "'Sheet1'!$A$1". Read-only.
no setter
addressLocal → String
Represents the reference name.
no setter
boolean ↔ String
getter/setter pair
builtInStyle ↔ BuiltInStyles?
Represent the built-in-style of the range.
getter/setter pair
calculatedValue → String?
Gets the calculated value of a formula in the Range. Read-only.
no setter
cells → List<Range>
Gets a see cref='Range object that represents the cells in the Range.Read-only.
no setter
cellStyle ↔ Style
Workbook workbook = new Workbook(); Worksheet sheet = workbook.worksheets[0]; Style rangeStyle = sheet.getRangeByName('A1').cellStyle; rangeStyle.bold = true; List<int> bytes = workbook.saveAsStream(); File('CellStyleRange.xlsx').writeAsBytes(bytes); workbook.dispose();
getter/setter pair
column ↔ int
Represents the colunm in range.
getter/setter pair
columnSpan ↔ int
Represents the column span.
getter/setter pair
columnWidth ↔ double
Represents the column width.
getter/setter pair
conditionalFormats → ConditionalFormats
Gets the collection of conditional formats in the Range. Read-only.
no setter
conditionalFormatValue ↔ String
getter/setter pair
count → int
Get count of the present Range
no setter
dataValidation → DataValidation
Gets the dataValidation for the Range.
no setter
dataValidationValue ↔ String
Represents the variable store single and multiple range values
getter/setter pair
dateTime ↔ DateTime?
Represent the DateTime of the Range
getter/setter pair
displayText → String
Gets cell value text with its number format. Read-only.
no setter
errorValue ↔ String
getter/setter pair
formula ↔ String?
Represent the range formula.
getter/setter pair
hasCellStyle → bool
no setter
hashCode → int
The hash code for this object.
no setterinherited
index ↔ int
Represent the index of the Range.
getter/setter pair
isAutoFitText ↔ bool
A boolean variable that indicates if display text of this range is called from AutoFitColumns().
getter/setter pair
isDefaultFormat → bool
Represent the format is default or not.
no setter
isMerged → bool
Checks whether Range is a part of merged Range.
no setter
isSingleRange → bool
Checks if the Range represents a single cell or Range of cells. Read-only.
no setter
lastColumn ↔ int
Represents the last column in range.
getter/setter pair
lastRow ↔ int
Represents the last row in range.
getter/setter pair
number ↔ double?
Represent the Number of the Range
getter/setter pair
numberFormat ↔ String?
Represent the NumberFormat of the Range
getter/setter pair
row ↔ int
Represents the row in range.
getter/setter pair
rowHeight ↔ double
Represents the row height.
getter/setter pair
rowSpan ↔ int
Represents the row span.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
saveType ↔ String
Represents the save type.
getter/setter pair
styleIndex ↔ int
getter/setter pair
text ↔ String?
Represent the Text of the Range
getter/setter pair
textIndex ↔ int
getter/setter pair
type ↔ CellType
Represents the cell type.
getter/setter pair
value ↔ Object?
Represent the DateTime of the Range
getter/setter pair
workbook → Workbook
Represent the workbook of the range.
no setter
worksheet → Worksheet
Represent the worksheet of the range.
no setter

Methods

autoFit() → void
Changes the width of the columns and height of the rows in the Range to achieve the best fit.
autoFitColumns() → void
Changes the width of the columns in the Range to achieve the best fit.
autoFitRows() → void
Changes the height of the rows in the Range to achieve the best fit.
autoFitToColumn(int firstColumn, int lastColumn) → void
Auto fits the column from specified first to last column.
clear() → void
Releases the unmanaged resources used by the XmlReader and optionally releases the managed resources.
freezePanes() → void
Creates freeze panes that keep the selected rows and columns visible in the range while scrolling the worksheet.
getDateTime() → DateTime?
Get Range Date time value.
getDisplayText(int row, int column) → String
Gets the display text.
getFormula() → String?
Get formula value to the range.
getNumber() → double
Set number value to the range.
getText() → String?
Get text value to the range.
merge() → void
Set Merge Combines the contents of the selected cells in a new larger cell.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setBuiltInStyle(BuiltInStyles? value) → void
Set built-in-style.
setDateTime(DateTime? dateTime) → void
Set DateTime value to the range.
setFormula(String? formula) → void
Set formula value to the range.
setFormulaBooleanValue(String value) → void
Set formula boolean value.
setFormulaDateValue(DateTime dateTime) → void
Set formula DateTime value to the range.
setFormulaErrorStringValue(String eValue) → void
Set formula error string value.
setFormulaNumberValue(double number) → void
Set formula number value to the range.
setFormulaStringValue(String text) → void
Set formula string value to the range.
setNumber(double? number) → void
Set number value to the range.
setRowHeight(double value, bool bIsBadFontHeight) → void
Sets row height.
setText(String? text) → void
Set text value to the range.
setValue(Object? value) → void
Set value to the range.
showColumns(bool? isVisible) → void
Shows or hides columns in the given range. TRUE by default.
showRange(bool? isVisible) → void
Shows or hides rows and columns in the given range. TRUE by default.
showRows(bool? isVisible) → void
Shows or hides rows in the given range. TRUE by default.
toString() → String
A string representation of this object.
inherited
unmerge() → void
Separates merged cells into individual cells.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromOADate(double doubleOLEValue) → DateTime
Returns a DateTime equivalent to the specified OLE Automation Date.
getCellName(int row, int column) → String
Get cell name from row and column.
getColumnName(int col) → String
Get column name from column.
isMergedCell(Range range, bool isRow, int num4) → List
Determines whether the Range is Merged or not.
toOADate(DateTime date) → double
Convert date to OA value.

Constants

equalsSign → const String
Equivalent symbol for formula.