> For the complete documentation index, see [llms.txt](https://docs.visualyze.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.visualyze.ai/integrations/office-365/activities/excel/insert-rows.md).

# Insert Rows

Inserts row to a table in the given workbook.

This activity inserts rows at a specific position in the user-specified table in the given workbook using the Microsoft Graph [Create row](https://docs.microsoft.com/en-us/graph/api/table-post-rows?view=graph-rest-1.0\&tabs=http) API.

### Input

* **Connection Id:** [`GraphServiceClient Variable`](/getting-started/rpa-studio/variables.md#graphserviceclient) <mark style="color:red;">`Required`</mark>\
  Specifies the office 365 connection id.
* **Table Name:** [`String Argument`](/getting-started/rpa-studio/arguments.md#string)  <mark style="color:red;">`Required`</mark>\
  Specifies the name of the table in which the row is to be inserted.
* **Workbook:** [`Object Argument`](/getting-started/rpa-studio/arguments.md#types-of-arguments) <mark style="color:red;">`Required`</mark>\
  Specifies the [DriveItem ](https://docs.microsoft.com/en-us/graph/api/resources/driveitem?view=graph-rest-1.0)of the Excel workbook that contains the table in which the specified row is to be inserted. We can also specify the output variable of the [Find Files And Folders](/integrations/office-365/activities/files/find-files-and-folders.md) activity (which is **First** or **Results**) directly as input in this property or use the output variable of the [Create Workbook](/integrations/office-365/activities/excel/create-workbook.md) activity (**Workbook**). If we are using the **Results** property of **Find Files And Folders** activity then we can directly specify the element in the array.\
  For example : Results\[1].

### What To Insert

* **Empty Rows:** [`Object Argument`](/getting-started/rpa-studio/arguments.md#string)\
  Specifies the number of empty rows that are to be inserted.
* **Row Values:** [`DataTable Variable`](/getting-started/rpa-studio/variables.md#datatable) <mark style="color:red;">`Required`</mark>\
  Specifies the rows of data that are to be inserted in the given table in the workbook. The input should be provided as a **DataTable** containing rows of data.

{% hint style="info" %}
The number of columns in the DataTable input in the **Row Values** property should match the column count in the given table in the user-specified workbook in the **Workbook** property.
{% endhint %}

### Where To Insert

* **Insert Position:**\
  Specifies the position at which the rows are to be inserted in the table. The available options are:

  * **Start**
  * **End**
  * **Specific Index**

  By default, the value is set to **Start.**
* **Specific Index:** [`Object Argument`](/getting-started/rpa-studio/arguments.md#string)\
  Specifies the row number in the given table after which the rows are to be inserted. This property is taken into consideration only when the **Insert Position** is set to **Specific Index**.
