[]
Interface that represent a range of a worksheet.
public interface IRange
Public Interface IRange
Name | Description |
---|---|
AllowEdit | Gets a value indicating whether the range can be edited on a protected worksheet. |
Areas | Gets an IAreas collection that represents all the ranges in a multiple-area selection. |
Borders | Gets the IBorders object that represents the borders of the specified object. |
CellType | Gets or sets the cell type for cells in this IRange. |
Cells | Gets a IRange object that represents the cells in the specified range. |
Column | Gets the zero based column number of the first column of this IRange. |
Column2 | Gets the zero based column number of the last column of this IRange. |
ColumnCount | Gets the number of columns in this IRange. |
ColumnWidth | Gets or sets the width of the column. |
Columns | Gets a new instance of IRange which represents all columns belong to this IRange. |
Comment | Gets a Comment object that represents the comment associated with the cell in the upper-left corner of the range. |
CommentThreaded | Gets an ICommentThreaded object that represents the threaded comment associated with the cell in the upper-left corner of the range. |
Count | Get an integer value that represents the number of cells in the range. |
CurrentArray | Gets an IRange object that represents the entire array if the specified cell is part of an array. |
CurrentRegion | Gets an IRange object that represents the current region. The current region is a range bounded by any combination of blank rows and blank columns. |
Dependents | Returns a IRange object that represents the range containing all the dependents of a cell. This can be a multiple selection (a union of Range objects) if there's more than one dependent. |
DirectDependents | Returns a IRange object that represents the range containing all the direct dependents of a cell. This can be a multiple selection (a union of Range objects) if there's more than one dependent. |
DirectPrecedents | Returns a IRange object that represents the range containing all the direct precedents of a cell. This can be a multiple selection (a union of Range objects) if there's more than one dependent. |
DisplayFormat | Gets a DisplayFormat object that represents the display settings for the specified range. |
EntireColumn | Gets a IRange object that represents the entire column (or columns) that contains the specified range. |
EntireRow | Gets a IRange object that represents the entire row (or rows) that contains the specified range. |
Font | Gets the IFont object that represents the font of the specified object. |
FormatConditions | Gets all format conditions of this IRange. |
FormattedValue | Gets or sets the cell value(s). |
Formula | Gets or sets the formula, which will implicitly intersect as required when set, for this IRange. |
Formula2 | Gets or sets the formula for this IRange. |
Formula2R1C1 | Gets or sets the formula using R1C1-style notation for this IRange. |
FormulaArray | Gets or sets the array formula for this IRange. |
FormulaR1C1 | Gets or sets the formula using R1C1-style notation which will implicitly intersect as required when set, for this IRange. |
HasArray | Gets a value indicating whether the specified cell is part of an array formula. |
HasFormula | Gets a value indicating whether all cells in the range contain formulas. |
HasRichDataType |
|
HasSpill | Gets a value indicating whether all cells are part of a spilled range. |
Height | Gets a long value that represents the height, in pixels, of the range. |
Hidden | Gets or sets a value indicating whether this IRange is hidden. |
HorizontalAlignment | Gets or sets the horizontal alignment. |
Hyperlinks | Gets an IHyperlinks collection that represents the hyperlinks for the range. |
IndentLevel | Gets or sets the indent level. |
Interior | Gets the IInterior object that represents the interior of the specified object. |
this[Reference] | Gets the IRange with the specified range. |
this[int] | Gets the IRange at the specified cell position. |
this[int, int] | Gets the IRange with the specified row and column. |
this[int, int, int, int] | Gets the IRange with the specified range. |
this[string] | Gets the IRange with the specified reference. |
Left | Returns a long value that represents the distance, in pixels, from the left edge of column A to the left edge of the range. |
Locked | Gets or sets a value indicating whether this IRange is locked. |
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 the specified cell. |
MergeCells | Gets or sets a value indicating whether this range contains merged cells. |
MergePolicy | Gets or sets a MergePolicy value indicating whether to automatically merge adjacent identical cells. |
Next | Returns an IRange object that represents the next cell. |
NumberFormat | Gets or sets the number format of current cell. |
Orientation | Gets or sets the text orientation. |
OutlineLevel | Gets or sets the current outline level of the specified row or column. |
PageBreak | Gets or sets the location of a page break. |
Precedents | Returns an IRange object that represents all the precedents of a cell. This can be a multiple selection (a union of Range objects) if there's more than one precedent. |
Previous | Returns an IRange object that represents the previous cell. |
Resizable | Gets or sets whether the range is resizable. |
Row | Gets the zero based row number of the first row of this IRange. |
Row2 | Gets the zero based row number of the last row of this IRange. |
RowCount | Gets the number of rows in this IRange. |
RowHeight | Gets or sets the height of the row. |
Rows | Gets a new instance of IRange which represents all rows belong to this IRange. |
ShowDetail |
|
ShrinkToFit | Gets or sets a value indicating whether text automatically shrinks to fit in the available column width. |
SparklineGroups | Gets an ISparklineGroups object that represents an existing group of sparklines from the specified range. |
Style | Gets or sets the style for the cell. |
Summary | Gets a value indicating whether the range is an outlining summary row or column. |
Table | |
Text | Gets or sets the text for the cell. |
Top | Gets a long value that represents the distance, in pixels, from the top edge of row 1 to the top edge of the range. |
UseStandardHeight | Gets or sets a boolean value indicating whether the row height of the IRange object equals the standard height of the sheet.
Returns |
UseStandardWidth | Gets or sets a boolean value indicating whether the column width of the IRange object equals the standard width of the sheet.
Returns |
Validation | Gets an instance of IValidation which may be used to get and set validation properties of the cells represented by this IRange. |
Value | Gets or sets the cell value. |
VerticalAlignment | Gets or sets the vertical alignment. |
Width | Gets a long value that represents the width, in pixels, of the range. |
Worksheet | Gets a Worksheet object that represents the worksheet containing the specified range. |
WrapText | Gets or sets a value indicating whether Spread wraps the text in the object. |
Name | Description |
---|---|
Activate() | Activates a single cell, which must be inside the current selection. |
AddComment(RichText) | Adds a comment to the cell. |
AddComment(string) | Adds a comment to the cell. |
AddCommentThreaded(string) | Adds a new modern threaded comment to the range if no comment already exists. |
Address(bool, bool, ReferenceStyle, bool, CellReference, bool) | Returns a string value that represents the range reference. |
Address(bool, bool, ReferenceStyle, bool, IRange) | Returns a string value that represents the range reference. |
Address(bool, bool, ReferenceStyle, bool, string) | Returns a string value that represents the range reference. |
ApplyNumberFormat(NumberFormat) | Applies the number format to the range. |
ApplyStyle(BuiltInStyle) | Applies the builtIn style to the range. |
ApplyStyle(string) | Applies the named style to the range. |
ApplyStyleFormat(ref StyleFormat) | Applies the style format to the range. |
AutoFill(int, int, int, int, AutoFillType) | Performs an autofill on the cells in the specified range. |
AutoFill(string, AutoFillType) | Performs an autofill on the cells in the specified range. |
AutoFilter(bool, bool) | Creates the automatic filter for current selection if the filter doesn't exist; otherwise, remove the filter. |
AutoFilter(int, CfIcon) | Add the icon filter. |
AutoFilter(int, Color) | Add the font color filter. |
AutoFilter(int, DynamicFilterType) | Add the dynamic filter. |
AutoFilter(int, Fill) | Add the cell fill color filter. |
AutoFilter(int, object, AutoFilterOperator, object) | Filters a list using the AutoFilter. |
AutoFit(bool, bool) | Changes the width of the columns or the height of the rows in the range to achieve the best fit. |
BorderAround(BorderLineStyle) | Adds a border to a range and sets the Color and LineStyle properties of the IBorder object for the new border. |
BorderAround(BorderLineStyle, Color) | Adds a border to a range and sets the Color and LineStyle properties of the IBorder object for the new border. |
Calculate() | Calculates this range of cells on a worksheet. |
Characters(int, int) | Gets an ICharacters object that represents a range of characters within the object text. You can use the ICharacters object to format characters within a text string. |
Clear(ManipulationOptions) | Removes all the data and formulas from the specified range of cells. |
ClearHyperlinks() | Removes all hyperlinks from the specified range. |
Copy(IRange, ManipulationOptions) | Copies the data from a range of cells to a specified range of cells. |
Copy(bool, bool) | Copies the data from a range of cells to clipboard. |
Copy(int, int, ManipulationOptions) | Copies the data from a range of cells to a specified range of cells. |
Copy(string, ManipulationOptions) | Copies the data from a range of cells to a specified range of cells. |
CreateCamera() | Creates an ICamera object that represents the visual of a cell range. |
CreateTable(bool, string, string) | Creates the ITable at the specified cell range. |
Cut(bool) | Cuts the data from a range of cells to clipboard. |
DataTable(CellReference, CellReference) | Creates a data table based on input values and formulas that you define on a worksheet. |
DataTable(IRange, IRange) | Creates a data table based on input values and formulas that you define on a worksheet. |
DataTable(string, string) | Creates a data table based on input values and formulas that you define on a worksheet. |
Delete(DeleteShiftDirection) | Delete a cell or a range of cells into the worksheet and shifts other cells. |
Dirty() | Designates a range to be recalculated when the next recalculation occurs. |
End(Direction, bool) | Returns an IRange object that represents the cell at the end of the region that contains the source range. |
FillDown() | Fills down from the top cell or cells in the specified range to the bottom of the range. The contents and formatting of the cell or cells in the top row of a range are copied into the rest of the rows in the range. |
FillLeft() | Fills left from the rightmost cell or cells in the specified range. The contents and formatting of the cell or cells in the rightmost column of a range are copied into the rest of the columns in the range. |
FillRight() | Fills right from the leftmost cell or cells in the specified range. The contents and formatting of the cell or cells in the leftmost column of a range are copied into the rest of the columns in the range. |
FillUp() | Fills up from the bottom cell or cells in the specified range to the top of the range. The contents and formatting of the cell or cells in the bottom row of a range are copied into the rest of the rows in the range. |
Find(object, object, FindLookIn, LookAt, SearchOrder, SearchDirection, bool) | Finds specific information in a range. |
FindNext(object) | Continues a search that was begun with the Find(object, object, FindLookIn, LookAt, SearchOrder, SearchDirection, bool) method. Finds the next cell that matches those same conditions and returns a Range object that represents that cell. |
FindPrevious(object) | Continues a search that was begun with the Find(object, object, FindLookIn, LookAt, SearchOrder, SearchDirection, bool) method. Finds the previous cell that matches those same conditions and returns an IRange object that represents that cell. |
GetFullDependents() | Returns an array of IRange object that represents the ranges containing all the dependents of a cell. This can be a multiple selection (a union of Range objects) if there's more than one dependent. |
GetFullPrecedents(bool) | Returns an array of IRange object that represents all the precedents of a cell. This can be a multiple selection (a union of Range objects) if there's more than one precedent. |
GoalSeek(double, CellReference, bool) | Calculates the values necessary to achieve a specific goal. |
GoalSeek(double, IRange, bool) | Calculates the values necessary to achieve a specific goal. |
GoalSeek(double, string, bool) | Calculates the values necessary to achieve a specific goal. |
Group() | Demotes a range in an outline (that is, increases its outline level). The specified range must be a row or column, or a range of rows or columns. |
Insert(InsertShiftDirection, InsertFormatOrigin) | Inserts a cell or a range of cells into the worksheet and shifts other cells away to make space. |
InsertIndent(int) | Adds an indent to the specified range. |
InsertPictureInCell(Stream) | Inserts local picture directly into cell. |
InsertPictureInCell(string) | Inserts local picture directly into cell. |
Merge(bool, bool, bool) | Creates a merged cell from the specified IRange object. |
Move(IRange, ManipulationOptions) | Moves the data from a range of cells to the specified location. |
Move(int, int, ManipulationOptions) | Moves the data from a range of cells to the specified location. |
Move(string, ManipulationOptions) | Moves the data from a range of cells to the specified location. |
Offset(int, int) | Returns a IRange object that represents a translated range from the specified range. |
PastePictureInCell() | Pastes the picture from clipboard into cell. |
PasteSpecial(PasteType, PasteSpecialOperation, bool, bool) | Creates a command that paste specified data to the worksheet. |
Range(string, string) | Get an IRange object that represents a cell or a range of cells. |
RemoveDuplicates(int[], YesNoGuess) | Removes duplicate values from a range of values. |
Resize(int, int) | Resizes the specified range. |
Select() | Select a cell or a range of cells. |
Show() | Scrolls through the contents of the active window to move the range into view. The range must consist of a single cell in the active document. |
ShowCard() | For a cell containing a rich data type, implement IRichValue, this method causes a card to appear that shows details about the cell (that is, the same card that the user can view by choosing the cell icon). |
SpecialCells(SpecialCellType, SpecialCellsValue) | Gets a IRange object that represents all the cells that match the specified type and value. |
TextToColumns(IRange, TextParsingType, TextQualifier, bool, bool, bool, bool, bool, bool, char, Tuple<int, ColumnDataType>[], char, char, bool) | |
TextToColumns(int, int, TextParsingType, TextQualifier, bool, bool, bool, bool, bool, bool, char, Tuple<int, ColumnDataType>[], char, char, bool) | |
TextToColumns(string, TextParsingType, TextQualifier, bool, bool, bool, bool, bool, bool, char, Tuple<int, ColumnDataType>[], char, char, bool) | Parses a column of cells that contain text into several columns. |
UnMerge() | Separates a merged area into individual cells. |
Ungroup() | Promotes a range in an outline (that is, decreases its outline level). The specified range must be a row or column, or a range of rows or columns. |