# Create WorkBook

This activity creates a new excel workbook with a user-specified name at a user-specified parent directory using the Microsoft Graph [Upload item](https://docs.microsoft.com/en-us/graph/api/driveitem-put-content?view=graph-rest-1.0\&tabs=http) API.

### Input

* **Connection Id:** [`GraphServiceClient Variable`](https://docs.visualyze.ai/getting-started/rpa-studio/variables#graphserviceclient) <mark style="color:red;">`Required`</mark>\
  Specifies the office 365 connection id.
* **Name:** [`String Argument`](https://docs.visualyze.ai/getting-started/rpa-studio/arguments#string)  <mark style="color:red;">`Required`</mark>\
  Specifies the name of the excel workbook that is to be created.
* **Parent Drive Item:** [`Object Argument`](https://docs.visualyze.ai/getting-started/rpa-studio/arguments#types-of-arguments)\
  Specifies the [DriveItem ](https://docs.microsoft.com/en-us/graph/api/resources/driveitem?view=graph-rest-1.0)of the parent directory in which the workbook is to be created. If left blank the workbook will be created at the root of the drive. We can also specify the output variable of [Find Files And Folders](https://docs.visualyze.ai/integrations/office-365/activities/files/find-files-and-folders) activity (which is **First** or **Results**) directly as input in this property. If we are using the **Results** property of the **Find Files And Folders** activity then we can directly specify the element in the array.\
  For example : Results\[1].
* **Conflict Behavior:**\
  Specifies a conflict resolution behavior in a case where a workbook with the same name already exists in the parent directory. The available options are:
  * **Replace**
  * **Fail**
  * **Rename**

### **Output**

* **Workbook:**[`DriveItem Variable`](https://docs.visualyze.ai/getting-started/rpa-studio/variables#driveitem) <mark style="color:red;">`Required`</mark>\
  Specifies the newly created workbook as a DriveItem.
* **Workbook Url:**[`String Variable`](https://docs.visualyze.ai/getting-started/rpa-studio/variables#string)\
  Specifies the newly created workbook as a DriveItem.
