activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

生产力活动

上次更新日期 2026年1月15日

插入列

UiPath.Excel.Activities.Business.InsertColumnX

在工作表、表格或范围中的指定位置插入列。可以添加列标题,并选择格式化列中数据的方式。该活动可以与为父级使用 Excel 文件活动选择的 Excel 文件一起使用,也可以与“项目笔记本”一起使用。

配置活动

在活动正文中
  • 范围- 单击字段右侧的加号,从菜单中选择文件,然后选择要在其中插入列的工作表、表格或范围,或者选择在 Excel 中指明以直接从文件中指明范围。或者,也可以选择“自定义输入”以手动输入范围、表格名称或工作表名称,或选择“在高级编辑器中打开”以输入 VB 表达式。

  • Has headers - If this option is selected, it indicates that the first row in the defined source range is a header row. When you then indicate where to insert the column, the values in the column headers are displayed in Relative to column > Range, enabling you to easily identify the column next to which to insert the new column. If this option is not selected, Relative to column > Range displays column letters when the source range is a sheet or a range, or header row values when the source range is a table.

  • “参照列” - 单击字段右侧的“加号” ,选择“范围” ,然后选择要将新列插入到的位置旁边的现有列。根据您为源范围含标头选择的内容,列可以由所选内容第一行中的值或列的字母来标识。

  • Where - Select if the column should be added before or after the column selected for Relative to column.

  • “添加标头” - 单击字段右侧的“加号” ,然后使用菜单中的某个选项来选择要在新列的第一行中添加为标题的值。如果未定义标题,则新列的第一行中的单元格为空。

    • “范围”- 从源范围中选择一个列标头。
    • Select an Excel file and then a named cell whose contents to use as header, or select Indicate in Excel to indicate a cell directly from the file.
    • Use Saved Value - Select a value that you previously saved for later use in the project.
    • Text - Enter text in the Text Builder.
    • “运行时询问”- 执行项目时提示输入文本。
    • Open in Advanced Editor - Enter a VB expression.
  • Format data as type - Click Set Format to open the Format data as type window, and then select the format for the data in the new column from the Category drop-down list: General, Number, Date, Time, Percentage, Currency, Text, or Custom. Depending on your selection, other options may appear for additional configuration.

备注:

默认情况下,Excel 使用左侧列的格式。要显式设置新列的格式,请使用“设置格式”按钮。

属性面板

常见

  • DisplayName - The name displayed for the activity in the Designer panel.

输入

  • 添加标头 - 请在活动主体中查看添加标头
  • 参照列 - 请在活动主体中查看参照列
  • “范围” — 请参阅活动主体中的“范围”
  • 插入位置 - 请在活动主体中查看位置

其他

  • 私有 - 选中后将不再以“Verbose”级别记录变量和参数的值。

选项

  • “有标题” - 在活动主体中查看“有标题”
  • 配置活动

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo
信任与安全
© 2005-2026 UiPath。保留所有权利。