XmlMappedRange.InsertIndent 方法

XmlMappedRange 控件添加一个缩进量。

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

语法

声明
Sub InsertIndent ( _
    InsertAmount As Integer _
)
void InsertIndent(
    int InsertAmount
)

参数

  • InsertAmount
    类型:System.Int32
    要添加到当前缩进的量。

备注

使用此方法将缩进级别设置为小于 0(零)或大于 15 的数会导致错误。

使用IndentLevel 属性返回范围的缩进级别。

示例

下面的代码示例使用 InsertIndent 方法为 XmlMappedRange 设置一个缩进级别。此代码示例假定当前工作表包含一个名为 CustomerLastNameCell 的 XmlMappedRange

Private Sub AddIndent()
    Me.CustomerLastNameCell.Value2 = "Smith"
    Me.CustomerLastNameCell.InsertIndent(2)
End Sub
private void AddIndent()
{
    this.CustomerLastNameCell.Value2 = "Smith";
    this.CustomerLastNameCell.InsertIndent(2);
}

.NET Framework 安全性

请参见

参考

XmlMappedRange 接口

Microsoft.Office.Tools.Excel 命名空间