다음을 통해 공유


XmlMappedRange.Insert(Object, Object) Method

Definition

Inserts a cell into the XmlMappedRange control and shifts other cells away to make space.

public object Insert (object Shift, object CopyOrigin);
abstract member Insert : obj * obj -> obj
Public Function Insert (Optional Shift As Object, Optional CopyOrigin As Object) As Object

Parameters

Shift
Object

Specifies which way to shift the cells. Can be one of the following XlInsertShiftDirection values: xlShiftToRight or xlShiftDown. If this argument is omitted, Microsoft Office Excel selects a value.

CopyOrigin
Object

The copy origin.

Returns

Examples

The following code example uses the Insert method to insert a cell above an XmlMappedRange. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

private void InsertAbove()
{
    this.CustomerLastNameCell.Insert(
        Excel.XlInsertShiftDirection.xlShiftDown);
}
Private Sub InsertAbove()
    Me.CustomerLastNameCell.Insert(Excel.XlInsertShiftDirection.xlShiftDown)
End Sub

Remarks

Optional Parameters

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

Applies to