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
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
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
count int
Get count of the present Range
no setter
dataValidation DataValidation
Gets the dataValidation for the Range.
no setter
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
formula String?
Represent the range formula.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isDefaultFormat bool
Represent the format is default or not.
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
text String?
Represent the Text of the Range
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.
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.
setNumber(double? number) → void
Set number value to the range.
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