XmlMappedRange.Insert Method
Inserts a cell into the XmlMappedRange control and shifts other cells away to make space.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Syntax
'Declaration
Function Insert ( _
Shift As Object, _
CopyOrigin As Object _
) As Object
Object Insert(
Object Shift,
Object CopyOrigin
)
Parameters
- Shift
Type: System.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
Type: System.Object
The copy origin.
Return Value
Type: System.Object
Remarks
Optional Parameters
For information on optional parameters, see Optional Parameters in Office Solutions.
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 Sub InsertAbove()
Me.CustomerLastNameCell.Insert(Excel.XlInsertShiftDirection.xlShiftDown)
End Sub
private void InsertAbove()
{
this.CustomerLastNameCell.Insert(
Excel.XlInsertShiftDirection.xlShiftDown, missing);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.