活动
最新
False
横幅背景图像
工作流活动
上次更新日期 2024年4月22日

查找数据表

此方法模拟 VLOOKUP Excel 公式的行为。 它使您能够在指定的“ DataTable ”中搜索提供的值,并返回找到该值的行 索引 。 如果未找到提供的值,则返回的 行索引 为 -1。 此方法还可帮助您返回在单元格中找到的值,该值具有在行 索引 参数中指定的行坐标和在 目标列 属性类别中指定的列坐标。

定义

命名空间: UiPath Activities.System.API

程序集: UiPath.System.Activities.Api(在 UiPath.System.Activities.Api.dll 中)

重载

  
LookUpDataTable(DataTable, String, String, String)它使您能够在指定的“ DataTable ”中搜索提供的值,并返回找到该值的行 索引
LookUpDataTable(DataTable, String, String, String, Int32)它使您能够在指定的 DataTable 中搜索提供的值,并返回找到该值的行 索引 ,并允许您输入找到的单元格的行号。

LookUpDataTable(DataTable, String, String, String)

它使您能够在指定的“ DataTable ”中搜索提供的值,并返回找到该值的行 索引
Object LookupDataTable(
	DataTable dataTable,
	string lookupValue,
	string lookupColumnName,
	string targetColumnName
)Object LookupDataTable(
	DataTable dataTable,
	string lookupValue,
	string lookupColumnName,
	string targetColumnName
)
dataTable 数据表
在其中执行查找的数据表。
lookupValue 字符串
要在数据表中搜索的值。
lookupColumnName 字符串
要在上述数据表集中搜索的列的名称。
targetColumnName 字符串
返回在此列与 RowIndex 参数中的值之间的坐标处找到的单元格的值。 如果未设置目标列,则单元格值为 null。

LookUpDataTable(DataTable, String, String, String, Int32)

它使您能够在指定的 DataTable 中搜索提供的值,并返回找到该值的行 索引 ,并允许您输入找到的单元格的行号。
Object LookupDataTable(
	DataTable dataTable,
	string lookupValue,
	string lookupColumnName,
	string targetColumnName,
	out int rowIndex
)Object LookupDataTable(
	DataTable dataTable,
	string lookupValue,
	string lookupColumnName,
	string targetColumnName,
	out int rowIndex
)
dataTable 数据表
在其中执行查找的数据表。
lookupValue 字符串
要在数据表中搜索的值。
lookupColumnName 字符串
要在上述数据表集中搜索的列的名称。
targetColumnName 字符串
返回在此列与 RowIndex 参数中的值之间的坐标处找到的单元格的值。 如果未设置目标列,则单元格值为 null。
rowIndex Int32
找到的单元格的行索引,存储在 Int32 变量中。 如果未找到提供的值,则行索引为 -1。

返回值

在单元格中找到的值,其具有在行 索引 属性中指定的行坐标和在 目标列 属性类别中指定的列坐标。 输出类型与源数据类型匹配。

此页面是否有帮助?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath 白色徽标
信任与安全
© 2005-2024 UiPath. All rights reserved.