Winnovative Excel Library

ExcelRange Class

Winnovative Excel Library Documentation
Represents a range of cells in a worksheet
Inheritance Hierarchy

SystemObject
  Winnovative.ExcelLibExcelRange

Namespace:  Winnovative.ExcelLib
Assembly:  wnvxls (in wnvxls.dll) Version: 10.0.0.0 (10.0.0.0)
Syntax

public class ExcelRange

The ExcelRange type exposes the following members.

Properties

  NameDescription
Public propertyAddress
Gets the range reference in A1 notation and in the language of the macro.
Public propertyBooleanValue
Gets or sets the boolean value of the range. Returns false if the range cells don't contain a boolean value or the boolean value is not the same in all the cells. Setting this property has the same effect as setting the Value property with a Boolean value.
Public propertyBottomRowIndex
Returns the zero based index of the last row of the specified range.
Public propertyCells
Gets the cells in this range.
Public propertyColumns
Gets an array of ExcelRangeColumn objects representing the columns in this specified range.
Public propertyColumnWidthInChars
Gets or sets the width in characters of the columns in the range.
Public propertyComment
Gets the comment of this range or null if no comment was assigned to this range. The range is expected to contain a single cell otherwise the comment of the top left cell of the range will be returned.
Public propertyCount
Gets the number of cells in range
Public propertyDataValidator
Gets the data validator object of this range.
Public propertyDateTimeValue
Gets or sets the DateTime value of the range. Returns DateTime.MinValue if the range cells don't contain a DateTime or the DateTime value is not the same in all the cells. Setting this property has the same effect as setting the Value property with a DateTime value.
Public propertyErrorValue
Gets or sets the error of this range. Returns null if the range cells don't contain an error value or the error value is not the same in all the cells. When this property is set with a string value which is not an error string an exception will be thrown.
Public propertyFormula
Gets or sets the formula of the range in A1 notation.
Public propertyFormulaArray
Gets or sets array formula of the range in A1 notation.
Public propertyFormulaArrayR1C1
Gets or sets array formula of the range in A1 notation.
Public propertyFormulaR1C1
Gets or sets the formula of the range in R1C1 notation.
Public propertyFormulaResultBooleanValue
Gets or sets the calculated result of the formula of this range as a Boolean value.
Public propertyFormulaResultDateTimeValue
Gets or sets the calculated result of the formula of this range as a DateTime value.
Public propertyFormulaResultErrorValue
Gets or sets the calculated result of the formula of this range as an Error value.
Public propertyFormulaResultNumberValue
Gets or sets the calculated result of the formula of this range as a Double value.
Public propertyFormulaResultText
Gets or sets the calculated result of the formula of this range as a String value.
Public propertyFormulaResultValue
Gets or sets the calculated result of the formula of this range.
Public propertyHasDataValidator
Gets a value indicating if the range has a data validator.
Public propertyHasDefaultStyle
Gets a value indicating if the specified range was set with a style different from the default style. True means all the range cells have the default style.
Public propertyHyperlinks
Gets the collection of hyperlinks of this range
Public propertyIsArrayFormula
Gets a flag indicating if all the cells in the range contain an array formula.
Public propertyIsBoolean
Gets a flag indicating if all the cells in the range are of boolean type.
Public propertyIsEmpty
Gets a flag indicating if all the cells in the range are empty.
Public propertyIsError
Gets a flag indicating if all the cells in the range contain an error string.
Public propertyIsFormula
Gets a flag indicating if all the cells in the range contain a formula.
Public propertyIsFormulaResultBoolean
Gets a flag indicating if the result of the formulas in all the cells in the range are of Boolean type.
Public propertyIsFormulaResultError
Gets a flag indicating if the result of the formulas in all the cells in the range are of Error type.
Public propertyIsFormulaResultNumber
Gets a flag indicating if the result of the formulas in all the cells in the range are of Double type.
Public propertyIsFormulaResultString
Gets a flag indicating if the result of the formulas in all the cells in the range are of String type.
Public propertyIsNumber
Gets a flag indicating if all the cells in the range are of number type.
Public propertyIsString
Gets a flag indicating if all the cells in the range are of string type.
Public propertyLeftColumnIndex
Returns the zero based index of the first column of the specified range.
Public propertyMergeArea
Gets a merged Range object containing the specified cell or null if the specified cell is not part of a merged range
Public propertyNumberValue
Gets or sets the number value of the range. Returns Double.Nan if the range cells don't contain a number or the number value is not the same in all the cells. Setting this property has the same effect as setting the Value property with a Double value.
Public propertyRightColumnIndex
Returns the zero based index of the last column of the specified range.
Public propertyRowHeightInPoints
Gets or sets the height in points of the rows in the range.
Public propertyRows
Gets an array of Range objects representing the rows in this specified range.
Public propertyStyle
Gets or sets the style of the cell or range of cells. The property can be assigned with an existing style from the workbook styles collection. The returned object can be used to set the Number, Borders, Font, Fill, Allignment and Protection options.
Public propertyStyleName
Gets or sets the name of the style of the cell or range of cells. This can be the name of a user defined style or a predefined style.
Public propertyText
Gets or sets the string value of the range. Returns null if the cell does not contain text or the text is not the same in all the rane cells.
Public propertyTopRowIndex
Returns the zero based index of the first row of the specified range.
Public propertyValue
Gets or sets the cell value as an object. The setter will determine the value type (Boolean, DateTime or Number) from the specified object type. If it's not one these types range will be set with a Text value. If you simply want to set the range with a text you can use the Text property of the Range object. If you want to set a range with a formula string you can use the Formula or FormulaArray properties. If you want to set a range with an Error value you can use the ErrorValue property. If you want to disable the parsing of the string values and simply set the cell value to the specified string you can set ExcelWorksheet.ParseValueString = false.
Public propertyWorksheet
Gets the worksheet of this range
Top
Methods

  NameDescription
Public methodAddComment
Adds the comment with the specified text to this range. The range is expected to contain a single cell otherwise the comment will be placed on the top left cell of the range.
Public methodAutofitColumns
Changes the width of the range columns to achieve the best fit for the cells content.
Public methodAutofitRows
Changes the height of the range rows to achieve the best fit for the cells content.
Public methodClear
Clears the range content and the cells formatting
Public methodClearContents
Clears the range content but leaves the cells formatting
Public methodCopy
Copies this range to the specified destination range.
Public methodDelete
Deletes the cell in the range and shifts cells up to replace the deleted cells.
Public methodDelete(ExcelDeleteShiftDirection)
Deletes the cell in the range and shifts cells in the specified direction to replace the deleted cells.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFreezePanes
Freezes panes to keep row and column labels visible when the worksheet is scrolled. To lock rows select the row below where you want the freeze to appear (e.g. The range "A5" will freeze the rows from 1 to 4). To lock columns select the column to the right of where you want the split to appear (e.g. The range "D1" will freeze the columns A, B and C). To lock both rows and columns select the cell below and to the right of where you want the split to appear (e.g. The range "D5" will freeze the rows from 1 to 4 and the columns A, B and C).
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGroup(ExcelGroupBy)
Groups the range by rows or columns function of the groupBy parameter.
Public methodGroup(ExcelGroupBy, Boolean)
Groups the range by rows or columns function of the groupBy parameter.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMerge
Merge the cells in this range in a merged area.
Public methodMove
Moves the range to the specified destination range.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUnGroup
Ungroups the range.
Public methodUnMerge
Separates a merged range into individual cells.
Top
See Also

Reference