> ## Documentation Index
> Fetch the complete documentation index at: https://rpa.bazhuayu.com/helpcenter/llms.txt
> Use this file to discover all available pages before exploring further.

# 读取数据表格内容

## 指令说明

**描述：** 从数据表格中读取内容，支持矩形区域范围读取

## 参数说明

<Tabs>
  <Tab title="常规">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/At1Bhn6G7IYQARg7/helpcenter/commands/datatable/images/readdatasheetcommand-01.png?fit=max&auto=format&n=At1Bhn6G7IYQARg7&q=85&s=b5198442183aef04ca87129b7cdf10e4" alt="读取数据表格内容指令参数面板" width="658" height="475" data-path="helpcenter/commands/datatable/images/readdatasheetcommand-01.png" />

    | 参数        | 说明                                        |
    | --------- | ----------------------------------------- |
    | **数据表格**  | 选择一个获取到的或者通过"导入Excel/CSV至数据表格"创建的数据表格对象   |
    | **读取方式**  | 下拉选择：读取一行（按行读取数据表格内容）、读取单元格（按单元格读取数据表格内容） |
    | **行号**    | 行号从1开始，-n表示倒数第n行                          |
    | **保存结果至** | 保存读取到内容为变量                                |
  </Tab>

  <Tab title="高级">
    本指令暂无高级参数。
  </Tab>
</Tabs>

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/At1Bhn6G7IYQARg7/helpcenter/commands/datatable/images/readdatasheetcommand-02.png?fit=max&auto=format&n=At1Bhn6G7IYQARg7&q=85&s=85079d1fd22dab7094d9ccaf556b429e" alt="读取数据表格内容使用示例" width="754" height="103" data-path="helpcenter/commands/datatable/images/readdatasheetcommand-02.png" />

<img src="https://mintcdn.com/bazhuayu-rpa-docs/At1Bhn6G7IYQARg7/helpcenter/commands/datatable/images/readdatasheetcommand-03.png?fit=max&auto=format&n=At1Bhn6G7IYQARg7&q=85&s=04d04181ae90d55b13a28171da02b447" alt="读取数据表格内容使用示例" width="995" height="294" data-path="helpcenter/commands/datatable/images/readdatasheetcommand-03.png" />

**该流程执行逻辑：**

使用【**导入Excel至数据表格**】打开已有的Excel，指令对指定Sheet页位置进行

使用【**读取数据表格内容**】指令，分别读取指定单元格的第n行，第n列

执行【**打印日志**】指令分别打印保存结果

### 效果展示

执行完成后，指定范围的数据表格内容将保存至结果变量。

<Info>
  使用指令过程中遇到问题？前往 [八爪鱼RPA 开发者社区问答板块](https://rpa.bazhuayu.com/community/questions) 提问，获取官方与社区帮助。
</Info>
