UiPath Documentation
activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

工作流活动

上次更新日期 2026年4月16日

查找数据表

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

定义

命名空间: UiPath.Activities.System.API

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

重载

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

LookUpDataTable(DataTable, String, String, String)

它使您能够在指定的DataTable中搜索提供的值,并返回找到该值的“RowIndex”

Object LookupDataTable(
    DataTable dataTable,
    string lookupValue,
    string lookupColumnName,
    string targetColumnName
)
Object LookupDataTable(
    DataTable dataTable,
    string lookupValue,
    string lookupColumnName,
    string targetColumnName
)

dataTable “数据表” :要在其中执行查找的数据表。

lookupValue String :要在数据表中搜索的值。

lookupColumnName String : 要在上面设置的数据表中搜索的列的名称。

targetColumnName String :返回在此列与rowIndex参数值之间坐标处找到的单元格的值。如果未设置目标列,则单元格值为 null。

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

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

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 String :要在数据表中搜索的值。

lookupColumnName String : 要在上面设置的数据表中搜索的列的名称。

targetColumnName String :返回在此列与rowIndex参数值之间坐标处找到的单元格的值。如果未设置目标列,则单元格值为 null。

rowIndex Int32 :找到的单元格的行索引,存储在Int32变量中。如果未找到提供的值,则行索引为 -1。

返回值

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

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新