Class RangeGroup
Summary description for RangeGroup.
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation.Collections.Grouping
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
public class RangeGroup : CommonObject, IDisposable, IRange, IParentApplication, IEnumerable<IRange>, IEnumerable
Constructors
RangeGroup(IApplication, Object)
Creates new instance of the group.
Declaration
protected RangeGroup(IApplication application, object parent)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the new group. |
System.Object | parent | Parent object for the new group. |
RangeGroup(IApplication, Object, Int32, Int32)
Creates new instance of the group.
Declaration
public RangeGroup(IApplication application, object parent, int iFirstRow, int iFirstColumn)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the new group. |
System.Object | parent | Parent object for the new group. |
System.Int32 | iFirstRow | The first row of the range. |
System.Int32 | iFirstColumn | The first column of the range. |
RangeGroup(IApplication, Object, Int32, Int32, Int32, Int32)
Creates new instance of the group.
Declaration
public RangeGroup(IApplication application, object parent, int iFirstRow, int iFirstColumn, int iLastRow, int iLastColumn)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the new group. |
System.Object | parent | Parent object for the new group. |
System.Int32 | iFirstRow | The first row of the range. |
System.Int32 | iFirstColumn | The first column of the range. |
System.Int32 | iLastRow | The last row of the range. |
System.Int32 | iLastColumn | The last column of the range. |
RangeGroup(IApplication, Object, String)
Creates new instance of the group.
Declaration
public RangeGroup(IApplication application, object parent, string name)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the new group. |
System.Object | parent | Parent object for the new group. |
System.String | name | String representation of the range. |
RangeGroup(IApplication, Object, String, Boolean)
Creates new instance of the group.
Declaration
public RangeGroup(IApplication application, object parent, string name, bool IsR1C1Notation)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the new group. |
System.Object | parent | Parent object for the new group. |
System.String | name | String representation of the range. |
System.Boolean | IsR1C1Notation | Indicates is name in R1C1 notation. |
Fields
m_iFirstColumn
First column.
Declaration
protected int m_iFirstColumn
Field Value
Type | Description |
---|---|
System.Int32 |
m_iFirstRow
First row.
Declaration
protected int m_iFirstRow
Field Value
Type | Description |
---|---|
System.Int32 |
m_iLastColumn
Last column.
Declaration
protected int m_iLastColumn
Field Value
Type | Description |
---|---|
System.Int32 |
m_iLastRow
Last row.
Declaration
protected int m_iLastRow
Field Value
Type | Description |
---|---|
System.Int32 |
m_style
Style group.
Declaration
protected StyleGroup m_style
Field Value
Type | Description |
---|---|
StyleGroup |
Properties
Address
Returns the range reference in the language of the macro. Read-only String.
Declaration
public string Address { get; }
Property Value
Type | Description |
---|---|
System.String |
AddressGlobal
Returns range Address in format "'Sheet1'!$A$1".
Declaration
public string AddressGlobal { get; }
Property Value
Type | Description |
---|---|
System.String |
AddressLocal
Returns the range reference for the specified range in the language of the user. Read-only String.
Declaration
public string AddressLocal { get; }
Property Value
Type | Description |
---|---|
System.String |
AddressR1C1
Returns the range reference using R1C1 notation. Read-only String.
Declaration
public string AddressR1C1 { get; }
Property Value
Type | Description |
---|---|
System.String |
AddressR1C1Local
Returns the range reference using R1C1 notation. Read-only String.
Declaration
public string AddressR1C1Local { get; }
Property Value
Type | Description |
---|---|
System.String |
Boolean
Gets / sets boolean value that is contained by this range.
Declaration
public bool Boolean { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Borders
Returns a Borders collection that represents the borders of a style or a range of cells (including a range defined as part of a conditional format).
Declaration
public IBorders Borders { get; }
Property Value
Type | Description |
---|---|
IBorders |
BuiltInStyle
Gets/sets built in style.
Declaration
public BuiltInStyles? BuiltInStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<BuiltInStyles> |
CalculatedValue
Returns the calculated value of a formula using the most current inputs.
Declaration
public string CalculatedValue { get; }
Property Value
Type | Description |
---|---|
System.String |
Cells
Returns a Range object that represents the cells in the specified range. Read-only.
Declaration
public IRange[] Cells { get; }
Property Value
Type | Description |
---|---|
IRange[] |
CellStyle
Returns a Style object that represents the style of the specified range. Read/write IStyle.
Declaration
public IStyle CellStyle { get; set; }
Property Value
Type | Description |
---|---|
IStyle |
CellStyleName
Returns name of the Style object that represents the style of the specified range. Read/write String.
Declaration
public string CellStyleName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Column
Returns the number of the first column in the first area in the specified range. Read-only.
Declaration
public int Column { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ColumnGroupLevel
Column group level. Read-only. -1 - Not all columns in the range have same group level. 0 - No grouping, 1 - 7 - Group level.
Declaration
public int ColumnGroupLevel { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Columns
For a Range object, returns an array of Range objects that represent the columns in the specified range.
Declaration
public IRange[] Columns { get; }
Property Value
Type | Description |
---|---|
IRange[] |
ColumnWidth
Returns or sets the width of all columns in the specified range. Read/write Double.
Declaration
public double ColumnWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Comment
Comment assigned to the range. Read-only.
Declaration
public ICommentShape Comment { get; }
Property Value
Type | Description |
---|---|
ICommentShape |
ConditionalFormats
Collection of conditional formats.
Declaration
public IConditionalFormats ConditionalFormats { get; }
Property Value
Type | Description |
---|---|
IConditionalFormats |
Count
Returns number of ranges in the group. Read-only.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
DataValidation
Data validation for the range.
Declaration
public IDataValidation DataValidation { get; }
Property Value
Type | Description |
---|---|
IDataValidation |
DateTime
Gets / sets DateTime contained by this cell. Read-write DateTime.
Declaration
public DateTime DateTime { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
DisplayText
Returns cell value after number format application. Read-only.
Declaration
public string DisplayText { get; }
Property Value
Type | Description |
---|---|
System.String |
End
Returns a Range object that represents the cell at the end of the region that contains the source range.
Declaration
public IRange End { get; }
Property Value
Type | Description |
---|---|
IRange |
EntireColumn
Returns a Range object that represents the entire column (or columns) that contains the specified range. Read-only.
Declaration
public IRange EntireColumn { get; }
Property Value
Type | Description |
---|---|
IRange |
EntireRow
Returns a Range object that represents the entire row (or rows) that contains the specified range. Read-only.
Declaration
public IRange EntireRow { get; }
Property Value
Type | Description |
---|---|
IRange |
Error
Gets / sets error value that is contained by this range.
Declaration
public string Error { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Formula
Returns or sets the object's formula in A1-style notation and in the language of the macro. Read/write Variant.
Declaration
public string Formula { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FormulaArray
Represents array-entered formula.
Declaration
public string FormulaArray { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FormulaArrayR1C1
Returns or sets the object's formula in R1C1-style notation and in the language of the macro. Read/write Variant.
Declaration
public string FormulaArrayR1C1 { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FormulaBoolValue
Gets / sets number value evaluated by formula.
Declaration
public bool FormulaBoolValue { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
FormulaDateTime
Get / set formula DateTime value contained by this cell. DateTime.MinValue if not all cells of the range have same DateTime value.
Declaration
public DateTime FormulaDateTime { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
FormulaErrorValue
Returns the calculated value of the formula as a string.
Declaration
public string FormulaErrorValue { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FormulaHidden
True if the formula will be hidden when the worksheet is protected. False if at least part of formula in the range is not hidden.
Declaration
public bool FormulaHidden { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
FormulaNumberValue
Gets / sets number value evaluated by formula.
Declaration
public double FormulaNumberValue { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
FormulaR1C1
Returns or sets the object's formula in R1C1-style notation and in the language of the macro. Read/write Variant.
Declaration
public string FormulaR1C1 { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FormulaStringValue
Gets / sets string value evaluated by formula.
Declaration
public string FormulaStringValue { get; set; }
Property Value
Type | Description |
---|---|
System.String |
HasBoolean
Indicates whether range contains bool value. Read-only.
Declaration
public bool HasBoolean { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasDataValidation
Indicates whether specified range object has data validation. If Range is not single cell, then returns true only if all cells have data validation. Read-only.
Declaration
public bool HasDataValidation { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasDateTime
Indicates whether range contains DateTime value. Read-only.
Declaration
public bool HasDateTime { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasExternalFormula
Indicates is current range has external formula. Read-only.
Declaration
public bool HasExternalFormula { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasFormula
True if all cells in the range contain formulas; False if at least one of the cells in the range doesn't contain a formula. Read-only Boolean.
Declaration
public bool HasFormula { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasFormulaArray
Indicates whether range contains array-entered formula. Read-only.
Declaration
public bool HasFormulaArray { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasFormulaBoolValue
Indicates if current range has formula bool value. Read-only.
Declaration
public bool HasFormulaBoolValue { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasFormulaDateTime
Indicates if current range has formula value formatted as DateTime. Read-only.
Declaration
public bool HasFormulaDateTime { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasFormulaErrorValue
Indicates if current range has formula error value. Read-only.
Declaration
public bool HasFormulaErrorValue { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasFormulaNumberValue
Indicates if the current range has formula number value. Read-only.
Declaration
public bool HasFormulaNumberValue { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasFormulaStringValue
Indicates if the current range has formula string value. Read-only.
Declaration
public bool HasFormulaStringValue { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasNumber
Indicates whether the range contains number. Read-only.
Declaration
public bool HasNumber { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasRichText
Indicates whether cell contains formatted rich text string.
Declaration
public bool HasRichText { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasString
Indicates whether the range contains String. Read-only.
Declaration
public bool HasString { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasStyle
Indicates whether range has default style. False means default style. Read-only.
Declaration
public bool HasStyle { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HorizontalAlignment
Returns or sets the horizontal alignment for the specified object. Read/write ExcelHAlign.
Declaration
public ExcelHAlign HorizontalAlignment { get; set; }
Property Value
Type | Description |
---|---|
ExcelHAlign |
HtmlString
Gets or sets HTML string.
Declaration
public string HtmlString { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Hyperlinks
Returns hyperlinks for this range group.
Declaration
public IHyperLinks Hyperlinks { get; }
Property Value
Type | Description |
---|---|
IHyperLinks |
IgnoreErrorOptions
Represents ignore error options. If not single cell returs concatenateed flags.
Declaration
public ExcelIgnoreError IgnoreErrorOptions { get; set; }
Property Value
Type | Description |
---|---|
ExcelIgnoreError |
IndentLevel
Returns or sets the indent level for the cell or range. Can be an integer from 0 to 15 for Excel 97-2003 and 250 for Excel 2007. Read/write Integer.
Declaration
public int IndentLevel { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsBlank
Indicates whether the range is blank. Read-only.
Declaration
public bool IsBlank { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsBoolean
Indicates whether range contains boolean value. Read-only.
Declaration
public bool IsBoolean { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsError
Indicates whether range contains error value.
Declaration
public bool IsError { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsGroupedByColumn
Indicates whether this range is grouped by column. Read-only.
Declaration
public bool IsGroupedByColumn { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsGroupedByRow
Indicates whether this range is grouped by row. Read-only.
Declaration
public bool IsGroupedByRow { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInitialized
Indicates whether cell is initialized. Read-only.
Declaration
public bool IsInitialized { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsMerged
Indicates whether this range is part of merged range. Read-only.
Declaration
public bool IsMerged { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsStringsPreserved
Indicates whether all values in the range are preserved as strings.
Declaration
public bool? IsStringsPreserved { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
Item[Int32]
Returns range from the specified worksheet in the range. Read-only.
Declaration
public IRange this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
IRange |
Item[Int32, Int32]
Gets / sets cell by row and column index. Row and column indexes are one-based.
Declaration
public IRange this[int row, int column] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | row | |
System.Int32 | column |
Property Value
Type | Description |
---|---|
IRange |
Item[Int32, Int32, Int32, Int32]
Get cell range. Row and column indexes are one-based. Read-only.
Declaration
public IRange this[int row, int column, int lastRow, int lastColumn] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | row | |
System.Int32 | column | |
System.Int32 | lastRow | |
System.Int32 | lastColumn |
Property Value
Type | Description |
---|---|
IRange |
Item[String]
Get cell range. Read-only.
Declaration
public IRange this[string name] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Property Value
Type | Description |
---|---|
IRange |
Item[String, Boolean]
Get cell range. Read-only.
Declaration
public IRange this[string name, bool IsR1C1Notation] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | name | |
System.Boolean | IsR1C1Notation |
Property Value
Type | Description |
---|---|
IRange |
LastColumn
Returns last column of the range. Read-only.
Declaration
public int LastColumn { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
LastRow
Returns last row of the range. Read-only.
Declaration
public int LastRow { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
MergeArea
Returns a Range object that represents the merged range containing the specified cell. If the specified cell isn�t in a merged range, this property returns NULL. Read-only.
Declaration
public IRange MergeArea { get; }
Property Value
Type | Description |
---|---|
IRange |
Number
Gets / sets double value of the range.
Declaration
public double Number { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
NumberFormat
Format of current cell. Analog of Style.NumberFormat property.
Declaration
public string NumberFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String |
RichText
String with rich text formatting. Read-only.
Declaration
public IRichTextString RichText { get; }
Property Value
Type | Description |
---|---|
IRichTextString |
Row
Returns the number of the first row of the first area in the range. Read-only Long.
Declaration
public int Row { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
RowGroupLevel
Row group level. Read-only. -1 - Not all rows in the range have same group level. 0 - No grouping, 1 - 7 - Group level.
Declaration
public int RowGroupLevel { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
RowHeight
Returns the height of all the rows in the range specified, measured in points. Returns Double.MinValue if the rows in the specified range aren't all the same height. Read / write Double.
Declaration
public double RowHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Rows
For a Range object, returns an array of Range objects that represent the rows in the specified range.
Declaration
public IRange[] Rows { get; }
Property Value
Type | Description |
---|---|
IRange[] |
Text
Gets / sets string value of the range.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String |
TimeSpan
Gets / sets time value of the range.
Declaration
public TimeSpan TimeSpan { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
Value
Returns or sets the value of the specified range. Read/write Variant.
Declaration
public string Value { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Value2
Returns or sets the cell value. Read/write Variant. The only difference between this property and the Value property is that the Value2 property doesn't use the Currency and Date data types.
Declaration
public object Value2 { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
VerticalAlignment
Returns or sets the vertical alignment of the specified object. Read/write ExcelVAlign.
Declaration
public ExcelVAlign VerticalAlignment { get; set; }
Property Value
Type | Description |
---|---|
ExcelVAlign |
Workbook
Returns parent workbook object. Read-only.
Declaration
public WorkbookImpl Workbook { get; }
Property Value
Type | Description |
---|---|
WorkbookImpl |
Worksheet
Returns a Worksheet object that represents the worksheet containing the specified range. Read-only.
Declaration
public IWorksheet Worksheet { get; }
Property Value
Type | Description |
---|---|
IWorksheet |
WrapText
True if Microsoft Excel wraps the text in the object. Read/write Boolean.
Declaration
public bool WrapText { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Activate()
Activates a single cell, which must be inside the current selection. To select a range of cells, use the Select method.
Declaration
public IRange Activate()
Returns
Type | Description |
---|---|
IRange |
Activate(Boolean)
Activates a single cell, scroll to it and activates the corresponding sheet. To select a range of cells, use the Select method.
Declaration
public IRange Activate(bool scroll)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | scroll | True to scroll to the cell |
Returns
Type | Description |
---|---|
IRange |
AddComment()
Adds comment to the range.
Declaration
public ICommentShape AddComment()
Returns
Type | Description |
---|---|
ICommentShape | Range's comment. |
AutofitColumns()
Autofits all columns in the range.
Declaration
public void AutofitColumns()
AutofitRows()
Autofits all rows in the range.
Declaration
public void AutofitRows()
Average()
Returns average of numeric cells in the range.
Declaration
public double Average()
Returns
Type | Description |
---|---|
System.Double |
Average(Boolean)
Returns average of numeric cells in the range.
Declaration
public double Average(bool considerDateAsNumber)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | considerDateAsNumber | Considers numeric value of date formatted cells for calculation. |
Returns
Type | Description |
---|---|
System.Double |
BorderAround()
Sets around border for current range.
Declaration
public void BorderAround()
BorderAround(ExcelLineStyle)
Sets around border for current range.
Declaration
public void BorderAround(ExcelLineStyle borderLine)
Parameters
Type | Name | Description |
---|---|---|
ExcelLineStyle | borderLine | Represents border line. |
BorderAround(ExcelLineStyle, ExcelKnownColors)
Sets around border for current range.
Declaration
public void BorderAround(ExcelLineStyle borderLine, ExcelKnownColors borderColor)
Parameters
Type | Name | Description |
---|---|---|
ExcelLineStyle | borderLine | Represents border line. |
ExcelKnownColors | borderColor | Represents border color as ExcelKnownColors. |
BorderAround(ExcelLineStyle, Color)
Sets around border for current range.
Declaration
public void BorderAround(ExcelLineStyle borderLine, Color borderColor)
Parameters
Type | Name | Description |
---|---|---|
ExcelLineStyle | borderLine | Represents border line. |
System.Drawing.Color | borderColor | Represents border color. |
BorderInside()
Sets inside border for current range.
Declaration
public void BorderInside()
BorderInside(ExcelLineStyle)
Sets inside border for current range.
Declaration
public void BorderInside(ExcelLineStyle borderLine)
Parameters
Type | Name | Description |
---|---|---|
ExcelLineStyle | borderLine | Represents border line. |
BorderInside(ExcelLineStyle, ExcelKnownColors)
Sets inside border for current range.
Declaration
public void BorderInside(ExcelLineStyle borderLine, ExcelKnownColors borderColor)
Parameters
Type | Name | Description |
---|---|---|
ExcelLineStyle | borderLine | Represents border line. |
ExcelKnownColors | borderColor | Represents border color as ExcelKnownColors. |
BorderInside(ExcelLineStyle, Color)
Sets inside border for current range.
Declaration
public void BorderInside(ExcelLineStyle borderLine, Color borderColor)
Parameters
Type | Name | Description |
---|---|---|
ExcelLineStyle | borderLine | Represents border line. |
System.Drawing.Color | borderColor | Represents border color. |
BorderNone()
Sets none border for current range.
Declaration
public void BorderNone()
Clear()
Clear the contents of the Range.
Declaration
public void Clear()
Clear(ExcelClearOptions)
Clears the contents, formats and comments of the cell, based on clear options.
Declaration
public void Clear(ExcelClearOptions option)
Parameters
Type | Name | Description |
---|---|---|
ExcelClearOptions | option |
Clear(ExcelMoveDirection)
Clear the contents of the Range and shifts the cells Up or Left without formula or merged ranges update.
Declaration
public void Clear(ExcelMoveDirection direction)
Parameters
Type | Name | Description |
---|---|---|
ExcelMoveDirection | direction | Cells shift direction Up/Left. |
Clear(ExcelMoveDirection, ExcelCopyRangeOptions)
Clear the contents of the Range and shifts the cells Up or Left.
Declaration
public void Clear(ExcelMoveDirection direction, ExcelCopyRangeOptions options)
Parameters
Type | Name | Description |
---|---|---|
ExcelMoveDirection | direction | Cells shift direction Up/Left. |
ExcelCopyRangeOptions | options | Cells shifting options. |
Clear(Boolean)
Clear the contents of the Range with formatting.
Declaration
public void Clear(bool isClearFormat)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isClearFormat | True if formatting should also be cleared. |
CollapseGroup(ExcelGroupBy)
Collapses current group.
Declaration
public void CollapseGroup(ExcelGroupBy groupBy)
Parameters
Type | Name | Description |
---|---|---|
ExcelGroupBy | groupBy | This parameter specifies whether the grouping should be performed by rows or by columns. |
CopyTo(IRange)
Copies the range to the specified destination Range (without updating formulas).
Declaration
public IRange CopyTo(IRange destination)
Parameters
Type | Name | Description |
---|---|---|
IRange | destination | Destination range. |
Returns
Type | Description |
---|---|
IRange | Range were this range was copied. |
CopyTo(IRange, ExcelCopyRangeOptions)
Copies this range into another location.
Declaration
public IRange CopyTo(IRange destination, ExcelCopyRangeOptions options)
Parameters
Type | Name | Description |
---|---|---|
IRange | destination | Destination range. |
ExcelCopyRangeOptions | options | Copy range options. |
Returns
Type | Description |
---|---|
IRange | Destination range. |
CopyTo(IRange, ExcelCopyRangeOptions, Boolean)
Copies the Range to the specified destination Range with copy options and skip blank option.
Declaration
public IRange CopyTo(IRange destination, ExcelCopyRangeOptions options, bool skipBlank)
Parameters
Type | Name | Description |
---|---|---|
IRange | destination | Represents the destination Range to copy. |
ExcelCopyRangeOptions | options | Represents the copy Range options. |
System.Boolean | skipBlank | Represents the skip blank cells in the source. |
Returns
Type | Description |
---|---|
IRange | Returns the copied Range. |
CopyTo(IRange, Boolean)
Copies this range into another location.
Declaration
public IRange CopyTo(IRange destination, bool bUpdateFormula)
Parameters
Type | Name | Description |
---|---|---|
IRange | destination | Destination range. |
System.Boolean | bUpdateFormula | Indicates whether update formula during copy. |
Returns
Type | Description |
---|---|
IRange |
CopyToClipboard()
Copies range to the clipboard.
Declaration
public void CopyToClipboard()
ExpandGroup(ExcelGroupBy)
Expands current group.
Declaration
public void ExpandGroup(ExcelGroupBy groupBy)
Parameters
Type | Name | Description |
---|---|---|
ExcelGroupBy | groupBy | This parameter specifies whether the grouping should be performed by rows or by columns. |
ExpandGroup(ExcelGroupBy, ExpandCollapseFlags)
Expands current group.
Declaration
public void ExpandGroup(ExcelGroupBy groupBy, ExpandCollapseFlags flags)
Parameters
Type | Name | Description |
---|---|---|
ExcelGroupBy | groupBy | This parameter specifies whether the grouping should be performed by rows or by columns. |
ExpandCollapseFlags | flags | Additional option flags. |
FindAll(Boolean)
This method searches for the all cells with specified bool value.
Declaration
public IRange[] FindAll(bool findValue)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | findValue | Value to search. |
Returns
Type | Description |
---|---|
IRange[] | All found cells, or Null if value was not found. |
FindAll(DateTime)
This method searches for the all cells with specified DateTime value.
Declaration
public IRange[] FindAll(DateTime findValue)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | findValue | Value to search. |
Returns
Type | Description |
---|---|
IRange[] | All found cells, or Null if value was not found. |
FindAll(Double, ExcelFindType)
This method searches for the all cells with specified double value.
Declaration
public IRange[] FindAll(double findValue, ExcelFindType flags)
Parameters
Type | Name | Description |
---|---|---|
System.Double | findValue | Value to search. |
ExcelFindType | flags | Flag that represent type of search. |
Returns
Type | Description |
---|---|
IRange[] | All found cells, or Null if value was not found. |
FindAll(String, ExcelFindType)
This method searches for the all cells with specified string value.
Declaration
public IRange[] FindAll(string findValue, ExcelFindType flags)
Parameters
Type | Name | Description |
---|---|---|
System.String | findValue | Value to search. |
ExcelFindType | flags | Flag that represent type of search. |
Returns
Type | Description |
---|---|
IRange[] | All found cells, or Null if value was not found. |
FindAll(TimeSpan)
This method searches for the all cells with specified TimeSpan value.
Declaration
public IRange[] FindAll(TimeSpan findValue)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | findValue | Value to search. |
Returns
Type | Description |
---|---|
IRange[] | All found cells, or Null if value was not found. |
FindFirst(String, ExcelFindType)
This method searches for the first cell with specified string value.
Declaration
public IRange FindFirst(string findValue, ExcelFindType flags)
Parameters
Type | Name | Description |
---|---|---|
System.String | findValue | Value to search. |
ExcelFindType | flags | Flag that represent type of search. |
Returns
Type | Description |
---|---|
IRange |
FindFirst(TimeSpan)
This method searches for the first cell with specified TimeSpan value.
Declaration
public IRange FindFirst(TimeSpan findValue)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | findValue | Value to search. |
Returns
Type | Description |
---|---|
IRange | First found cell, or Null if value was not found. |
FreezePanes()
Freezes pane at the current range.
Declaration
public void FreezePanes()
GetDependents()
Gets the dependent cells which refer to other cells.
Declaration
public IRange[] GetDependents()
Returns
Type | Description |
---|---|
IRange[] | Returns the dependent cells or null if value was not found. |
GetDependents(Boolean)
Gets the dependent cells which refer to other cells.
Declaration
public IRange[] GetDependents(bool isEntireWorkbook)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isEntireWorkbook | Indicates whether to check from other worksheets. |
Returns
Type | Description |
---|---|
IRange[] | Returns the dependent cells with a specified bool value or null if value was not found. |
GetDirectDependents()
Gets the direct dependent cells which refer to other cells.
Declaration
public IRange[] GetDirectDependents()
Returns
Type | Description |
---|---|
IRange[] | Returns the direct dependent cells or null if value was not found. |
GetDirectDependents(Boolean)
Gets the direct dependent cells which refer to other cells.
Declaration
public IRange[] GetDirectDependents(bool isEntireWorkbook)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isEntireWorkbook | Indicates whether to check from other worksheets. |
Returns
Type | Description |
---|---|
IRange[] | Returns the direct dependent cells with a specified bool value or null if value was not found. |
GetDirectPrecedents()
Gets the direct precedent cells which are referred by a formula in another cell.
Declaration
public IRange[] GetDirectPrecedents()
Returns
Type | Description |
---|---|
IRange[] | Returns the direct precedent cells or null if value was not found. |
GetDirectPrecedents(Boolean)
Gets the direct precedent cells which are referred by a formula in another cell.
Declaration
public IRange[] GetDirectPrecedents(bool isEntireWorkbook)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isEntireWorkbook | Indicates whether to check from other worksheets. |
Returns
Type | Description |
---|---|
IRange[] | Returns the direct precedent cells with a specified bool value or null if value was not found. |
GetEnumerator()
Returns an enumerator that iterates through the Range.
Declaration
public IEnumerator<IRange> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<IRange> |
GetPrecedents()
Gets the precedent cells which are referred by a formula in another cell.
Declaration
public IRange[] GetPrecedents()
Returns
Type | Description |
---|---|
IRange[] | Returns the precedent cells or null if value was not found. |
GetPrecedents(Boolean)
Gets the precedent cells which are referred by a formula in another cell.
Declaration
public IRange[] GetPrecedents(bool isEntireWorkbook)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isEntireWorkbook | Indicates whether to check from other worksheets. |
Returns
Type | Description |
---|---|
IRange[] | Returns the precedent cells with a specified bool value or null if value was not found. |
Group(ExcelGroupBy)
This method groups current range.
Declaration
public IRange Group(ExcelGroupBy groupBy)
Parameters
Type | Name | Description |
---|---|---|
ExcelGroupBy | groupBy | This parameter specifies whether the grouping should be performed by rows or by columns. |
Returns
Type | Description |
---|---|
IRange | Current range after grouping. |
Group(ExcelGroupBy, Boolean)
This method groups current range.
Declaration
public IRange Group(ExcelGroupBy groupBy, bool bCollapsed)
Parameters
Type | Name | Description |
---|---|---|
ExcelGroupBy | groupBy | This parameter specifies whether grouping should be performed by rows or by columns. |
System.Boolean | bCollapsed | Indicates whether group should be collapsed. |
Returns
Type | Description |
---|---|
IRange | Current range after grouping. |
IntersectWith(IRange)
Returns intersection of this range with the specified one.
Declaration
public IRange IntersectWith(IRange range)
Parameters
Type | Name | Description |
---|---|---|
IRange | range | The Range with which to intersect. |
Returns
Type | Description |
---|---|
IRange | Range intersection; if there is no intersection, NULL is returned. |
Max()
Returns maximum value from numeric cells in the range.
Declaration
public double Max()
Returns
Type | Description |
---|---|
System.Double |
Max(Boolean)
Returns maximum value from numeric cells in the range.
Declaration
public double Max(bool considerDateAsNumber)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | considerDateAsNumber | Considers numeric value of date formatted cells for calculation. |
Returns
Type | Description |
---|---|
System.Double |
Merge()
Creates a merged cell from the specified Range object.
Declaration
public void Merge()
Merge(Boolean)
Creates a merged cell from the specified Range object.
Declaration
public void Merge(bool clearCells)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | clearCells | Indicates whether to clear unnecessary cells. |
MergeWith(IRange)
Returns merge of this range with the specified one.
Declaration
public IRange MergeWith(IRange range)
Parameters
Type | Name | Description |
---|---|---|
IRange | range | The Range to merge with. |
Returns
Type | Description |
---|---|
IRange | Merged ranges or NULL if wasn't able to merge ranges. |
Min()
Returns minumum value from numeric cells in the range.
Declaration
public double Min()
Returns
Type | Description |
---|---|
System.Double |
Min(Boolean)
Returns minumum value from numeric cells in the range.
Declaration
public double Min(bool considerDateAsNumber)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | considerDateAsNumber | Considers numeric value of date formatted cells for calculation. |
Returns
Type | Description |
---|---|
System.Double |
MoveTo(IRange)
Moves the cells to the specified Range (without updating formulas).
Declaration
public void MoveTo(IRange destination)
Parameters
Type | Name | Description |
---|---|---|
IRange | destination | Destination Range. |
MoveTo(IRange, Boolean)
Moves the cells to the specified Range.
Declaration
public void MoveTo(IRange destination, bool bUpdateFormula)
Parameters
Type | Name | Description |
---|---|---|
IRange | destination | Destination Range |
System.Boolean | bUpdateFormula | Indicates whether to update formula after move operation. |
Offset(Int32, Int32)
Returns a Range object that represents a range thats offset from the specified range.
Declaration
public IRange Offset(int row, int column)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | row | The number of rows (positive, negative, or 0 (zero)) by which the range is to be offset |
System.Int32 | column | The number of columns (positive, negative, or 0 (zero)) by which the range is to be offset |
Returns
Type | Description |
---|---|
IRange |
Replace(String, DataColumn, Boolean)
Replaces the string with the specified datacolumn.
Declaration
public void Replace(string oldValue, DataColumn newValues, bool isFieldNamesShown)
Parameters
Type | Name | Description |
---|---|---|
System.String | oldValue | The string to be replaced. |
System.Data.DataColumn | newValues | DataColumn with new data. |
System.Boolean | isFieldNamesShown | Indicates whether field name must be shown. |
Replace(String, DataTable, Boolean)
Replaces the string with the specified datatable.
Declaration
public void Replace(string oldValue, DataTable newValues, bool isFieldNamesShown)
Parameters
Type | Name | Description |
---|---|---|
System.String | oldValue | The string to be replaced. |
System.Data.DataTable | newValues | Data table with new data. |
System.Boolean | isFieldNamesShown | Indicates whether field name must be shown. |
Replace(String, DateTime)
Replaces the string with the specified DateTime value.
Declaration
public void Replace(string oldValue, DateTime newValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | oldValue | The string to be replaced. |
System.DateTime | newValue | The datetime value to replace all occurrences of oldValue. |
Replace(String, Double)
Replaces the string with the specified double value.
Declaration
public void Replace(string oldValue, double newValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | oldValue | The string to be replaced. |
System.Double | newValue | The double value to replace all occurrences of oldValue. |
Replace(String, Double[], Boolean)
Replaces the string with the specified array of double values.
Declaration
public void Replace(string oldValue, double[] newValues, bool isVertical)
Parameters
Type | Name | Description |
---|---|---|
System.String | oldValue | The string to be replaced. |
System.Double[] | newValues | Array of new values. |
System.Boolean | isVertical | Indicates whether array should be inserted vertically. |
Replace(String, Int32[], Boolean)
Replaces the string with the specified array of int values.
Declaration
public void Replace(string oldValue, int[] newValues, bool isVertical)
Parameters
Type | Name | Description |
---|---|---|
System.String | oldValue | The string to be replaced. |
System.Int32[] | newValues | Array of new values. |
System.Boolean | isVertical | Indicates whether array should be inserted vertically. |
Replace(String, String)
Replaces the string with the specified string value.
Declaration
public void Replace(string oldValue, string newValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | oldValue | The string to be replaced. |
System.String | newValue | The string to replace all occurrences of oldValue. |
Replace(String, String, ExcelFindOptions)
Replaces the string with the specified string value based on the given ExcelFindOptions.
Declaration
public void Replace(string oldValue, string newValue, ExcelFindOptions findOptions)
Parameters
Type | Name | Description |
---|---|---|
System.String | oldValue | The string to be replaced. |
System.String | newValue | The string to replace all occurrences of oldValue. |
ExcelFindOptions | findOptions | Specifies the find options for the oldValue. |
Replace(String, String[], Boolean)
Replaces the string with the specified array of string values.
Declaration
public void Replace(string oldValue, string[] newValues, bool isVertical)
Parameters
Type | Name | Description |
---|---|---|
System.String | oldValue | The string to be replaced. |
System.String[] | newValues | Array of new values. |
System.Boolean | isVertical | Indicates whether array should be inserted vertically. |
Resize(Int32, Int32)
Resizes the specified range
Declaration
public IRange Resize(int row, int colummn)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | row | The number of rows in new range |
System.Int32 | colummn | The number of columns in new range |
Returns
Type | Description |
---|---|
IRange |
SubTotal(Int32, ConsolidationFunction, Int32[])
Creates Subtotal for the corresponding ranges
Declaration
public void SubTotal(int groupBy, ConsolidationFunction function, int[] totalList)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | groupBy | GroupBy |
ConsolidationFunction | function | ConsolidationFunction |
System.Int32[] | totalList | TotalList |
SubTotal(Int32, ConsolidationFunction, Int32[], Boolean, Boolean, Boolean)
Creates SubTotal for the corresponding Ranges
Declaration
public void SubTotal(int groupBy, ConsolidationFunction function, int[] totalList, bool replace, bool pageBreaks, bool summaryBelowData)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | groupBy | GroupByGroupBy |
ConsolidationFunction | function | ConsolidationFunction |
System.Int32[] | totalList | TotalList |
System.Boolean | replace | Replace exisiting SubTotal |
System.Boolean | pageBreaks | Insert PageBreaks |
System.Boolean | summaryBelowData | SummaryBelowData |
SubTotal(Int32[], ConsolidationFunction, Int32[], Boolean, Boolean, Boolean)
Creates SubTotal for the corresponding Ranges
Declaration
public void SubTotal(int[] groupBy, ConsolidationFunction function, int[] totalList, bool replace, bool pageBreaks, bool summaryBelowData)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | groupBy | Columns to GroupBy |
ConsolidationFunction | function | ConsolidationFunction |
System.Int32[] | totalList | TotalList |
System.Boolean | replace | Replace exisiting SubTotal |
System.Boolean | pageBreaks | Insert PageBreaks |
System.Boolean | summaryBelowData | SummaryBelowData |
Sum()
Returns sum of numeric cells in the range.
Declaration
public double Sum()
Returns
Type | Description |
---|---|
System.Double |
Sum(Boolean)
Returns sum of numeric cells in the range.
Declaration
public double Sum(bool considerDateAsNumber)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | considerDateAsNumber | Considers numeric value of date formatted cells for calculation. |
Returns
Type | Description |
---|---|
System.Double |
Trim()
Trim the empty rows at top and bottom of the range, the empty columns at left and right of the range.
Declaration
public IRange Trim()
Returns
Type | Description |
---|---|
IRange | Returns the range after trim. |
Ungroup(ExcelGroupBy)
Ungroups current range.
Declaration
public IRange Ungroup(ExcelGroupBy groupBy)
Parameters
Type | Name | Description |
---|---|---|
ExcelGroupBy | groupBy | Indicates type of ungrouping. Ungroup by columns or by rows. |
Returns
Type | Description |
---|---|
IRange | Current range after ungrouping. |
UnMerge()
Separates a merged area into individual cells.
Declaration
public void UnMerge()
Explicit Interface Implementations
IRange.Count
Returns the number of objects in the collection. Read-only.
Declaration
int IRange.Count { get; }
Returns
Type | Description |
---|---|
System.Int32 |
IRange.FindFirst(Boolean)
This method searches for the first cell with specified bool value.
Declaration
IRange IRange.FindFirst(bool findValue)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | findValue | Value to search. |
Returns
Type | Description |
---|---|
IRange | First found cell, or Null if value was not found. |
IRange.FindFirst(DateTime)
This method searches for the first cell with specified DateTime value.
Declaration
IRange IRange.FindFirst(DateTime findValue)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | findValue | Value to search. |
Returns
Type | Description |
---|---|
IRange | First found cell, or Null if value was not found. |
IRange.FindFirst(Double, ExcelFindType)
This method searches for the first cell with specified double value.
Declaration
IRange IRange.FindFirst(double findValue, ExcelFindType flags)
Parameters
Type | Name | Description |
---|---|---|
System.Double | findValue | Value to search. |
ExcelFindType | flags | Flag that represent type of search. |
Returns
Type | Description |
---|---|
IRange | First found cell, or Null if value was not found. |
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |