XmlMappedRange.Insert 方法

将一个单元格插入 XmlMappedRange 控件中并移走其他单元格以腾出空间。

命名空间:  Microsoft.Office.Tools.Excel
程序集:  Microsoft.Office.Tools.Excel(在 Microsoft.Office.Tools.Excel.dll 中)

语法

声明
Function Insert ( _
    Shift As Object, _
    CopyOrigin As Object _
) As Object
Object Insert(
    Object Shift,
    Object CopyOrigin
)

参数

返回值

类型:System.Object

备注

可选参数

有关可选参数的信息,请参见Office 解决方案中的可选参数

示例

下面的代码示例使用 Insert 方法在 XmlMappedRange 上方插入一个单元格。 此代码示例假定当前工作表包含一个名为 CustomerLastNameCell 的 XmlMappedRange

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

.NET Framework 安全性

请参见

参考

XmlMappedRange 接口

Microsoft.Office.Tools.Excel 命名空间