Share via


NamedRange Interface

Definition

A NamedRange control is a range that has a unique name, exposes events, and can be bound to data.

public interface class NamedRange : IDisposable, System::ComponentModel::IComponent, System::ComponentModel::ISupportInitialize, System::Windows::Forms::IBindableComponent
[System.Runtime.InteropServices.Guid("6b87f7cb-0689-4e7e-8dcb-3c0e654629bb")]
public interface NamedRange : IDisposable, System.ComponentModel.IComponent, System.ComponentModel.ISupportInitialize, System.Windows.Forms.IBindableComponent
[<System.Runtime.InteropServices.Guid("6b87f7cb-0689-4e7e-8dcb-3c0e654629bb")>]
type NamedRange = interface
    interface IBindableComponent
    interface IComponent
    interface IDisposable
    interface ISupportInitialize
Public Interface NamedRange
Implements IBindableComponent, IComponent, IDisposable, ISupportInitialize
Attributes
Implements

Remarks

For more information, see NamedRange Control.

Note

This interface is implemented by the Visual Studio Tools for Office runtime. It is not intended to be implemented in your code. For more information, see Visual Studio Tools for Office Runtime Overview.

Usage

This documentation describes the version of this type that is used in Office projects that target the .NET Framework 4 or later. In projects that target the .NET Framework 3.5, this type might have different members and the code examples provided for this type might not work. For documentation about this type in projects that target the .NET Framework 3.5, see the following reference section in the Visual Studio 2008 documentation: http://go.microsoft.com/fwlink/?LinkId=160658.

Properties

AddIndent

Gets or sets a value that determines whether text is automatically indented when the text alignment in the NamedRange control is set to equal distribution either horizontally or vertically.

Address

Gets the range reference for the NamedRange control.

AddressLocal

Gets the range reference for the NamedRange control in the language of the user.

AllowEdit

Gets a value that indicates whether the NamedRange control can be edited on a protected worksheet.

Application

Gets a Application that represents the creator of the NamedRange control.

Areas

Gets an Areas collection that represents all the ranges in a multiple-area selection.

Borders

Gets a Borders collection that represents the borders of the NamedRange control.

Cells

Gets a Range that represents the cells in the NamedRange control.

Characters

Gets a Characters object that represents a range of characters within the text of the NamedRange control.

Column

Gets the number of the first column in the first area of the NamedRange control.

Columns

Gets a Range that represents the one or more columns in the NamedRange control.

ColumnWidth

Gets or sets the width of all columns in the NamedRange control.

Comment

Gets a Comment that represents the comment associated with the cell in the upper left corner of the NamedRange control.

Container
Count

Gets the number of cells in the NamedRange control.

CountLarge

Gets the number of occurrences of the largest value in a range of values.

Creator

Gets a 32-bit integer that indicates the application in which the NamedRange control was created.

CurrentArray

If the NamedRange control is part of an array, gets a Range that represents the entire array.

CurrentRegion

Gets a Range that represents the current region.

DefaultDataSourceUpdateMode

Gets or sets the default DataSourceUpdateMode.

Dependents

Gets a Range that represents the range containing all the dependents of the NamedRange control.

DirectDependents

Gets a Range that represents the range containing all the direct dependents of the NamedRange control.

DirectPrecedents

Gets a Range that represents the range containing all the direct precedents of the NamedRange control.

DisplayFormat

Gets an object that represents the display settings for the specified range.

End

Gets a Range that represents the cell at the end of the region that contains the NamedRange control.

EntireColumn

Gets a Range that represents the entire column (or columns) that contains the NamedRange control.

EntireRow

Gets a Range that represents the entire row (or rows) that contains the NamedRange control.

Errors

Gets an Errors object that enables you to access error checking options.

Font

Gets a Font that represents the font of the NamedRange control.

FormatConditions

Gets a FormatConditions collection that represents all the conditional formats for the NamedRange control.

Formula

Gets or sets the NamedRange control's formula in A1-style notation.

FormulaArray

Gets or sets the array formula of the NamedRange control.

FormulaHidden

Gets or sets a value that indicates whether the formula in the NamedRange control will be hidden when the worksheet is protected.

FormulaLocal

Gets or sets the formula for the NamedRange control, using A1-style references in the language of the user.

FormulaR1C1

Gets or sets the formula for the object, using R1C1-style notation.

FormulaR1C1Local

Gets or sets the formula for the NamedRange control, using R1C1-style notation in the language of the user.

HasArray

Gets a value that indicates whether the NamedRange control is part of an array formula.

HasFormula

Gets a value that indicates whether all cells in the NamedRange control contain formulas.

Height

Gets the height of the NamedRange control.

Hidden

Gets or sets an object that indicates whether the rows or columns are hidden.

HorizontalAlignment

Gets or sets the horizontal alignment for the NamedRange control.

Hyperlinks

Gets a Hyperlinks collection that represents the hyperlinks in the NamedRange control.

ID

Gets or sets the identifying label for the NamedRange control when the page is saved as a Web page.

IndentLevel

Gets or sets the indent level for the NamedRange control.

InnerObject

Gets a Range that represents the underlying native object for the NamedRange.

Interior

Gets an Interior that represents the interior of the NamedRange control.

Item

Gets a Range that represents a range at an offset to the NamedRange control.

Left

Gets the distance from the left edge of column A to the left edge of the NamedRange control.

ListHeaderRows

Gets the number of header rows for the NamedRange control.

ListObject

Gets a ListObject for the NamedRange control.

LocationInTable

Gets a constant that describes the part of the PivotTable report that contains the upper-left corner of the NamedRange control.

Locked

Gets or sets a value that indicates whether the NamedRange control is locked.

MDX

Gets the MDX name for the specified NamedRange object.

MergeArea

Gets a Range that represents the merged range containing the NamedRange control.

MergeCells

Gets or sets a value that indicates whether the NamedRange control contains merged cells.

Name

Gets or sets a Name object for the NamedRange control.

Next

Gets a Range that represents the next cell.

NumberFormat

Gets or sets the format code for the NamedRange control.

NumberFormatLocal

Gets or sets the format code for the NamedRange control in the language of the user.

Offset

Gets a Range that is offset from the NamedRange control.

Orientation

Gets or sets the text orientation.

OutlineLevel

Gets or sets the current outline level of the NamedRange control.

PageBreak

Gets or sets the location of a page break.

Parent

Gets the parent object of the NamedRange control.

Phonetic

Gets the Phonetic object, which contains information about a specific phonetic text string in the NamedRange control.

Phonetics

Gets the Phonetics collection of the NamedRange control.

PivotCell

Gets a PivotCell that represents a cell in a PivotTable report.

PivotField

Gets a PivotField that represents the PivotTable field containing the upper left corner of the NamedRange control.

PivotItem

Gets a PivotItem that represents the PivotTable item containing the upper left corner of the NamedRange control.

PivotTable

Gets a PivotTable that represents the PivotTable report containing the upper left corner of the NamedRange control, or the PivotTable report associated with the PivotChart report.

Precedents

Gets a Range that represents all the precedents of the NamedRange control.

PrefixCharacter

Gets the prefix character for the NamedRange control.

Previous

Gets a Range that represents the previous cell.

QueryTable

Gets a QueryTable that represents the query table that intersects the NamedRange control.

ReadingOrder

Gets or sets the reading order for the NamedRange control.

RefersTo

Gets or sets the formula that the NamedRange control is defined to refer to, using A1-style notation.

RefersToLocal

Gets or sets the formula that the NamedRange control is defined to refer to, using A1-style notation in the language of the user.

RefersToR1C1

Gets or sets the formula that the NamedRange control is defined to refer to, using R1C1-style notation.

RefersToR1C1Local

Gets or sets the formula that the NamedRange control is defined to refer to, using R1C1-style notation in the language of the user.

RefersToRange

Gets the Range referred to by a NamedRange control.

Resize

Gets a resized Range based on the NamedRange control.

Row

Gets the number of the first row of the first area in the NamedRange control.

RowHeight

Gets or sets the height of all the rows in the NamedRange control, measured in points.

Rows

Gets a Range that represents one or more rows in the NamedRange control.

ServerActions

Gets the actions that can be performed on the Microsoft Office SharePoint server for a NamedRange object.

ShowDetail

Gets or sets an object that indicates whether the outline is expanded for the NamedRange control (so that the detail of the column or row is visible).

ShrinkToFit

Gets or sets a value that indicates whether text automatically shrinks to fit in the available column width.

SoundNote
SparklineGroups

Gets an object that represents an existing group of sparklines from the specified range.

Style

Gets or sets a Style that represents the style of the NamedRange control.

Summary

Gets a value that indicates whether the range is an outlining summary row or column.

Tag

Gets or sets the object that contains data about the Tag control.

Text

Gets the text for the NamedRange control.

Top

Gets the distance, in points, from the top edge of row 1 (one) to the top edge of the NamedRange control.

UseStandardHeight

Gets or sets a value that indicates whether the row height of the NamedRange control equals the standard height of the sheet.

UseStandardWidth

Gets or sets a value that indicates whether the column width of the NamedRange control equals the standard width of the sheet.

Validation

Gets a Validation object that represents data validation for the NamedRange control.

Value

Gets or sets the value of the NamedRange control.

Value2

Gets or sets the value of the NamedRange control.

VerticalAlignment

Gets or sets the vertical alignment of the NamedRange control.

Width

Gets the width of the NamedRange control in points.

Worksheet

Gets a Worksheet that represents the worksheet that contains the NamedRange control.

WrapText

Gets or sets a value that indicates whether Microsoft Office Excel wraps the text in the NamedRange control.

XPath

Gets an XPath that represents the Xpath of the element mapped to the NamedRange control.

Methods

Activate()

Activates a single-cell NamedRange control.

AddComment(Object)

Adds a comment to the NamedRange control.

AdvancedFilter(XlFilterAction, Object, Object, Object)

Filters or copies data from a list based on a criteria range.

AllocateChanges()

Performs a writeback operation for all edited cells in a named range based on an OLAP data source.

ApplyNames(Object, Object, Object, Object, Object, XlApplyNamesOrder, Object)

Applies names to the cells in the NamedRange control.

ApplyOutlineStyles()

Applies outlining styles to the NamedRange control.

AutoComplete(String)

Gets an AutoComplete match from the list.

AutoFill(Range, XlAutoFillType)

Automatically fills the cells in the NamedRange control.

AutoFilter(Object, Object, XlAutoFilterOperator, Object, Object)

Filters a list using the AutoFilter.

AutoFit()

Changes the width of the columns or the height of the rows in the NamedRange control to achieve the best fit.

AutoOutline()

Automatically creates an outline for the NamedRange control.

BorderAround2(Object, XlBorderWeight, XlColorIndex, Object, Object)

Adds a border to a NamedRange control and sets the Color, LineStyle, and Weight properties for the new border.

Calculate()

Calculates the values of cells in a NamedRange control.

CalculateRowMajorOrder()

Calculates a specific range of cells.

CheckSpelling(Object, Object, Object, Object)

Checks the spelling of text in the NamedRange control.

Clear()

Clears the entire NamedRange control.

ClearComments()

Clears all cell comments from the NamedRange control.

ClearContents()

Clears the formulas from the NamedRange control.

ClearFormats()

Clears the formatting of the NamedRange control.

ClearHyperlinks()

Removes all hyperlinks from the specified range.

ClearNotes()

Clears notes from all the cells in the NamedRange control.

ClearOutline()

Clears the outline for the NamedRange control.

ColumnDifferences(Object)

Gets a Range that represents all the cells whose contents are different from the comparison cell in each column.

Consolidate(Object, Object, Object, Object, Object)

Consolidates data from multiple ranges on multiple worksheets into the NamedRange control.

Copy(Object)

Copies the contents of the NamedRange control to the specified range or to the Clipboard.

CopyFromRecordset(Object, Object, Object)

Copies the contents of an ADO or DAO recordset into a worksheet, beginning at the upper-left corner of the NamedRange control.

CopyPicture(XlPictureAppearance, XlCopyPictureFormat)

Copies the NamedRange control to the Clipboard as a picture.

CreateNames(Object, Object, Object, Object)

Creates names in the NamedRange control, based on text labels in the sheet.

Cut(Object)

Cuts the contents of the NamedRange control to the Clipboard or pastes it into a specified destination.

DataSeries(Object, XlDataSeriesType, XlDataSeriesDate, Object, Object, Object)

Creates a data series in the NamedRange control.

Delete()

Deletes a dynamically created NamedRange control and removes it from the ControlCollection.

DialogBox()

Displays a dialog box defined by a dialog box definition table on a Microsoft Office Excel 4.0 macro sheet.

Dirty()

Designates the NamedRange control to be recalculated when the next recalculation occurs.

DiscardChanges()

Discards all changes in the edited cells of the range.

EditionOptions(XlEditionType, XlEditionOptionsOption, Object, Object, XlPictureAppearance, XlPictureAppearance, Object)
ExportAsFixedFormat(XlFixedFormatType, Object, Object, Object, Object, Object, Object, Object, Object)

Exports to a file of the specified format.

FillDown()

Fills down from the top cell or cells in the NamedRange control to the bottom of the NamedRange control.

FillLeft()

Fills left from the rightmost cell or cells in the NamedRange control.

FillRight()

Fills right from the leftmost cell or cells in the NamedRange control.

FillUp()

Fills up from the bottom cell or cells in the NamedRange control to the top of the range.

Find(Object, Object, Object, Object, Object, XlSearchDirection, Object, Object, Object)

Finds specific information in the NamedRange control, and returns a Range object that represents the first cell where that information is found.

FindNext(Object)

Continues a search that was begun with the Find(Object, Object, Object, Object, Object, XlSearchDirection, Object, Object, Object) method.

FindPrevious(Object)

Continues a search that was begun with the Find(Object, Object, Object, Object, Object, XlSearchDirection, Object, Object, Object) method.

FunctionWizard()

Starts the Function Wizard for the upper-left cell of the NamedRange control.

get_Value(Object)

Gets the value of the NamedRange control.

GetEnumerator()

Gets an IEnumerator that can be used to iterate over the cells in the NamedRange control.

Group(Object, Object, Object, Object)

When the NamedRange control represents a single cell in a PivotTable field’s data range, the Group(Object, Object, Object, Object) method performs numeric or date-based grouping in that field.

Insert(Object, Object)

Inserts a cell or a range of cells into the NamedRange control and shifts other cells away to make space.

InsertIndent(Int32)

Adds an indent to the NamedRange control.

Justify()

Rearranges the text in the NamedRange control so that it fills the range evenly.

ListNames()

Pastes a list of all displayed names onto the worksheet, beginning with the first cell in the NamedRange control.

Merge(Object)

Creates a merged cell from the NamedRange control.

NavigateArrow(Object, Object, Object)

Navigates a tracer arrow for the NamedRange control to the precedent, dependent, or error-causing cell or cells.

NoteText(Object, Object, Object)

Gets or sets the cell note associated with the cell in the upper-left corner of the NamedRange control.

Parse(Object, Object)

Parses a range of data and breaks it into multiple cells.

PasteSpecial(XlPasteType, XlPasteSpecialOperation, Object, Object)

Pastes the contents of a Range object from the Clipboard into the NamedRange control.

PrintOutEx(Object, Object, Object, Object, Object, Object, Object, Object)

Prints the object.

PrintPreview(Object)

Shows a preview of the NamedRange control as it would look when printed.

RemoveDuplicates(Object, XlYesNoGuess)

Removes duplicate values from a range of values.

RemoveSubtotal()

Removes subtotals from the NamedRange control.

Replace(Object, Object, Object, Object, Object, Object, Object, Object)

Replaces the specified characters in the NamedRange control with a new string.

RowDifferences(Object)

Gets a Range object that represents all the cells whose contents are different from those of the comparison cell in each row.

Select()

Selects the NamedRange control.

set_Value(Object, Object)

Sets the value of the NamedRange control.

SetPhonetic()

Creates Phonetic objects for all the cells in the NamedRange control.

Show()

Scrolls through the contents of the active window to move the NamedRange control into view.

ShowDependents(Object)

Draws tracer arrows to the direct dependents of the NamedRange control.

ShowErrors()

Draws tracer arrows through the precedents tree to the cell that is the source of the error, and returns the Range object that contains that cell.

ShowPrecedents(Object)

Draws tracer arrows to the direct precedents of the NamedRange control.

Sort(Object, XlSortOrder, Object, Object, XlSortOrder, Object, XlSortOrder, XlYesNoGuess, Object, Object, XlSortOrientation, XlSortMethod, XlSortDataOption, XlSortDataOption, XlSortDataOption)

Sorts the data in a NamedRange control.

SortSpecial(XlSortMethod, Object, XlSortOrder, Object, Object, XlSortOrder, Object, XlSortOrder, XlYesNoGuess, Object, Object, XlSortOrientation, XlSortDataOption, XlSortDataOption, XlSortDataOption)

Uses East Asian sorting methods to sort the NamedRange control. For example, Japanese sorts in the order of the Kana syllabary. For more information, see the parameters list.

Speak(Object, Object)

Causes the cells of the NamedRange control to be spoken in row order or column order.

SpecialCells(XlCellType, Object)

Gets a Range object that represents all the cells that match the specified type and value.

SubscribeTo(String, XlSubscribeToFormat)
Subtotal(Int32, XlConsolidationFunction, Object, Object, Object, XlSummaryRow)

Creates subtotals for the NamedRange control.

Table(Object, Object)

Creates a data table based on input values and formulas that you define in a worksheet.

TextToColumns(Object, XlTextParsingType, XlTextQualifier, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)

Parses a column of cells that contain text into several columns.

Ungroup()

Promotes the NamedRange control in an outline (that is, decreases its outline level).

UnMerge()

Separates a merged area into individual cells.

Events

BeforeDoubleClick

Occurs when a NamedRange control is double-clicked, before the default double-click action.

BeforeRightClick

Occurs when a NamedRange control is right-clicked, before the default right-click action.

BindingContextChanged
Change

Occurs when something changes in the NamedRange control.

Deselected

Occurs when selection moves from the NamedRange control to an area outside of the NamedRange control.

Selected

Occurs when the NamedRange control is selected.

SelectionChange

Occurs when the selection inside the NamedRange control changes.

Applies to