Click or drag to resize

ExcelRange Properties

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, Alignment 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 range 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
See Also