共用方式為


XmlMappedRange.Resize Property

Gets a resized Range based on the XmlMappedRange control.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Syntax

'Declaration
ReadOnly Property Resize As XmlMappedRange_ResizeType
XmlMappedRange_ResizeType Resize { get; }

Property Value

Type: Microsoft.Office.Tools.Excel.XmlMappedRange_ResizeType
A resized Range based on the XmlMappedRange control.

Remarks

The Resize property is intended to be used with the following parameters.

Parameter

Description

RowSize

The number of rows in the new range. If this argument is omitted, the number of rows in the range remains the same.

ColumnSize

The number of columns in the new range. If this argument is omitted, the number of columns in the range remains the same.

If you attempt to use Resize without specifying any parameters, Resize will get an XmlMappedRange_ResizeType object that is part of Office development tools in Visual Studio infrastructure and is not intended to be used directly from your code.

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

Examples

The following code example uses the Resize property to get a larger range based on an XmlMappedRange, and then selects the new range. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

Private Sub ResizeRange()
    Dim range1 As Excel.Range = Me.CustomerLastNameCell.Resize(2, 2)
    range1.Select()
End Sub
private void ResizeRange()
{
    Excel.Range range1 = this.CustomerLastNameCell.Resize[2, 2];
    range1.Select();
}

.NET Framework Security

See Also

Reference

XmlMappedRange Interface

Microsoft.Office.Tools.Excel Namespace