帮助中心

# findList-按值获取匹配的单元格列表

调用findList函数在区域内查找符合条件的单元格。

最小支持版本:5.6.0

# 接口说明

已获取ExcelRange实例,详情请参见getUsedRange (opens new window)

# 语法

<ExcelRange object>.findList(<what>, <startCell>, <index>, <offset>, <lookIn>, <lookAt>, <searchOrder>, <searchDirection>, <matchCase>, <matchByte>, <searchFormat>)
1
<ExcelRange object>.按值获取匹配的单元格列表(<what>, <startCell>, <index>, <offset>, <lookIn>, <lookAt>, <searchOrder>, <searchDirection>, <matchCase>, <matchByte>, <searchFormat>)
1

# 函数类型

实例函数

# 请求参数

参数名称 类型 是否必选 默认值 示例值 描述
what Cube.Object {} 需要查找的内容,可以为数字、字符串、Excel单元格等格式。
startCell Cube.Object {} 开始查找的单元格(不包含),不设置开始单元格则填写空值,会从区域左上角开始查找。
index Cube.Lang.Number -1 分页开始索引, -1表示不设置开始索引。
offset Cube.Lang.Number -1 分页偏移量,-1表示不设置分页偏移量,会从索引开始一直找到最后。
lookIn Cube.Lang.Number -4144 查找类型(在哪查找)。
-4144: 评论
-4184: 嵌套评论
-4123: 公式
-4163: 值
lookAt Cube.Lang.Number 1 查找方式。
2: 部分匹配
1: 全部匹配
searchOrder Cube.Lang.Number 1 查找顺序。
2: 按列
1: 按行
searchDirection Cube.Lang.Number 1 查找方向。
1: 向后
2: 向前
matchCase Cube.Lang.Boolean true true 是否区分大小写。取值:
true:区分大小写
false:不区分大小写
matchByte Cube.Lang.Boolean true true 是否严格匹配双字节编码字符, 是否区分全/半角。
searchFormat Cube.Lang.Boolean true true 是否使用Excel应用的FindFormat设置。

# 返回参数

参数名称 类型 示例值 描述
Result Cube.Lang.List {} 查找到单元格返回单元格(ExcelCell),找不到则返回空值。

# 请求示例

ExcelRange对象.findList({},{},-1,-1,-4144, 1, 1, 1, true, true, true)
1
最近更新时间: { "value": "2023-09-12", "effect": true }