XmlMappedRange.ReadingOrder 属性
获取或设置 XmlMappedRange 控件的读取顺序。
命名空间: Microsoft.Office.Tools.Excel
程序集: Microsoft.Office.Tools.Excel(在 Microsoft.Office.Tools.Excel.dll 中)
语法
声明
Property ReadingOrder As Integer
int ReadingOrder { get; set; }
属性值
类型:System.Int32
以下值之一:xlRTL(从右向左)、xlLTR(从左向右)或 xlContext。
备注
其中一些常数可能对您不可用,这取决于您所选择或安装的支持语言 (例如 U.S. 英语)。
示例
下面的代码示例使用 ReadingOrder 属性反转 XmlMappedRange 的读取顺序(如果选择或安装的当前语言支持该顺序)。 此代码示例假定当前工作表包含一个名为 CustomerLastNameCell 的 XmlMappedRange。
Private Sub ReverseReadingOrder()
If Me.CustomerLastNameCell.ReadingOrder = Excel.Constants.xlRTL Then
Me.CustomerLastNameCell.ReadingOrder = Excel.Constants.xlLTR
Else
Me.CustomerLastNameCell.ReadingOrder = Excel.Constants.xlRTL
End If
End Sub
private void ReverseReadingOrder()
{
if (this.CustomerLastNameCell.ReadingOrder ==
(int)Excel.Constants.xlRTL)
{
this.CustomerLastNameCell.ReadingOrder =
(int)Excel.Constants.xlLTR;
}
else
{
this.CustomerLastNameCell.ReadingOrder =
(int)Excel.Constants.xlRTL;
}
}
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。