> ## 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.

# 获取当前激活的Excel对象

## 指令说明

**描述：** 获取当前激活的Excel文件。

## 参数说明

<Tabs>
  <Tab title="常规">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/PoBbJh6tQuwbCrmc/helpcenter/commands/excel/images/getopenedexcelcommand-01.png?fit=max&auto=format&n=PoBbJh6tQuwbCrmc&q=85&s=0fa300d744777436797bd4ac23e7cd29" alt="获取当前激活的Excel对象指令参数面板" width="655" height="350" data-path="helpcenter/commands/excel/images/getopenedexcelcommand-01.png" />

    | 参数               | 说明         |
    | ---------------- | ---------- |
    | **保存Excel数据对象至** | 保存读取到内容为变量 |
  </Tab>

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

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/PoBbJh6tQuwbCrmc/helpcenter/commands/excel/images/getopenedexcelcommand-02.png?fit=max&auto=format&n=PoBbJh6tQuwbCrmc&q=85&s=e3bd9568dea3ba9ba73ac73e8aeac01c" alt="获取当前激活的Excel对象使用示例 - 流程搭建" width="845" height="241" data-path="helpcenter/commands/excel/images/getopenedexcelcommand-02.png" />

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

使用【获取当前激活的Excel对象】命令获取当前激活的Excel对象，将对象保存到excel对象1

使用【读取Excel内容】指令读取excel对象1中默认Sheet里第1行第1列单元格内容将结果保存到excel单元格

使用【打印日志】指令打印excel单元格消息日志

使用【关闭Excel】指令关闭并保存excel对象

### 效果展示

<img src="https://mintcdn.com/bazhuayu-rpa-docs/PoBbJh6tQuwbCrmc/helpcenter/commands/excel/images/getopenedexcelcommand-03.png?fit=max&auto=format&n=PoBbJh6tQuwbCrmc&q=85&s=c16a241751bad8506ed66cfc8686b843" alt="获取当前激活的Excel对象使用示例 - 效果展示" width="845" height="277" data-path="helpcenter/commands/excel/images/getopenedexcelcommand-03.png" />

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