> ## 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表格中的单元格进行合并或拆分操作。

## 参数说明

<Tabs>
  <Tab title="常规">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/XU4apql8B34CRdwD/helpcenter/commands/excel/images/mergeorsplitexcelcellcommand-01.png?fit=max&auto=format&n=XU4apql8B34CRdwD&q=85&s=9525e228fde0a32f39a1d39f52744d7f" alt="合并/拆分单元格指令参数面板" width="655" height="626" data-path="helpcenter/commands/excel/images/mergeorsplitexcelcellcommand-01.png" />

    | 参数           | 说明                                                         |
    | ------------ | ---------------------------------------------------------- |
    | **Excel对象**  | 请选择Excel对象（可通过指令【启动Excel】或【获取当前激活的Excel对象】创建），用于确定待操作的工作簿。 |
    | **Sheet页名称** | 操作目标工作表的名称，支持选填，默认为当前Excel激活的Sheet页。                       |
    | **操作类型**     | 下拉选择：合并单元格、拆分单元格                                           |
    | **单元格区域**    | 填写需要合并或拆分的单元格区域。                                           |
  </Tab>

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

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/XU4apql8B34CRdwD/helpcenter/commands/excel/images/mergeorsplitexcelcellcommand-02.png?fit=max&auto=format&n=XU4apql8B34CRdwD&q=85&s=4ad1e96ab0dd8ca1ddbbbe0ed8d35929" alt="合并/拆分单元格使用示例 - 流程搭建" width="1024" height="194" data-path="helpcenter/commands/excel/images/mergeorsplitexcelcellcommand-02.png" />

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

使用【启动Excel】打开已有的Excel，并将Excel对象保存到excel对象

使用【合并/拆分单元格】指令对指定区域进行合并或拆分操作

### 效果展示

<img src="https://mintcdn.com/bazhuayu-rpa-docs/XU4apql8B34CRdwD/helpcenter/commands/excel/images/mergeorsplitexcelcellcommand-03.png?fit=max&auto=format&n=XU4apql8B34CRdwD&q=85&s=9b3439a0f0ddfb28e8597176042ee1a2" alt="合并/拆分单元格使用示例 - 效果展示" width="999" height="128" data-path="helpcenter/commands/excel/images/mergeorsplitexcelcellcommand-03.png" />

<img src="https://mintcdn.com/bazhuayu-rpa-docs/XU4apql8B34CRdwD/helpcenter/commands/excel/images/mergeorsplitexcelcellcommand-04.png?fit=max&auto=format&n=XU4apql8B34CRdwD&q=85&s=7894b7863cdaee06c472c78c80a5c74e" alt="合并/拆分单元格使用示例 - 效果展示 2" width="537" height="131" data-path="helpcenter/commands/excel/images/mergeorsplitexcelcellcommand-04.png" />

<img src="https://mintcdn.com/bazhuayu-rpa-docs/XU4apql8B34CRdwD/helpcenter/commands/excel/images/mergeorsplitexcelcellcommand-05.png?fit=max&auto=format&n=XU4apql8B34CRdwD&q=85&s=164a654817a4aa333e01377792f28bbc" alt="合并/拆分单元格使用示例 - 效果展示 3" width="537" height="113" data-path="helpcenter/commands/excel/images/mergeorsplitexcelcellcommand-05.png" />

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