> ## 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/XU4apql8B34CRdwD/helpcenter/commands/excel/images/writeexcelrowcommand-10.png?fit=max&auto=format&n=XU4apql8B34CRdwD&q=85&s=4f6b8d057fa9471b4357934c7ecbea83" alt="按行写入内容至Excel工作表指令参数面板" width="637" height="542" data-path="helpcenter/commands/excel/images/writeexcelrowcommand-10.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/writeexcelrowcommand-11.png?fit=max&auto=format&n=XU4apql8B34CRdwD&q=85&s=70cbc735b2fb7b48b2d60b7a4ca65a4c" alt="按行写入内容至Excel工作表使用示例 - 流程搭建" width="687" height="161" data-path="helpcenter/commands/excel/images/writeexcelrowcommand-11.png" />

<img src="https://mintcdn.com/bazhuayu-rpa-docs/XU4apql8B34CRdwD/helpcenter/commands/excel/images/writeexcelrowcommand-12.png?fit=max&auto=format&n=XU4apql8B34CRdwD&q=85&s=3688ffe23bca2ba728917c6ea13899cf" alt="按行写入内容至Excel工作表使用示例 - 指令配置" width="635" height="581" data-path="helpcenter/commands/excel/images/writeexcelrowcommand-12.png" />

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

1. 使用【启动Excel】连接目标工作簿并生成 Excel 对象。
2. 执行【按行写入内容至Excel工作表】，选择默认 Sheet，将数据 `2, 2` 从指定行的第 1 列开始依次写入。
3. 写入后，目标行的第 1、2 列分别显示 `2`、`2`，最后按需要保存并关闭工作簿。

### 效果展示

<img src="https://mintcdn.com/bazhuayu-rpa-docs/XU4apql8B34CRdwD/helpcenter/commands/excel/images/writeexcelrowcommand-13.png?fit=max&auto=format&n=XU4apql8B34CRdwD&q=85&s=d994d5636c1ba7ccd4223b3bc35752e4" alt="按行写入内容至Excel工作表效果展示 - 运行日志" width="1249" height="238" data-path="helpcenter/commands/excel/images/writeexcelrowcommand-13.png" />

<img src="https://mintcdn.com/bazhuayu-rpa-docs/XU4apql8B34CRdwD/helpcenter/commands/excel/images/writeexcelrowcommand-14.png?fit=max&auto=format&n=XU4apql8B34CRdwD&q=85&s=76ca1da7c47e8493fa197d22e4b2182b" alt="按行写入内容至Excel工作表效果展示 - Excel结果" width="1609" height="248" data-path="helpcenter/commands/excel/images/writeexcelrowcommand-14.png" />

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