# Excel

## **Introduction**&#x20;

Autom Mate's Excel library offers a powerful set of actions designed to automate and simplify various tasks within Excel workbooks. This comprehensive guide provides detailed instructions on each available action, empowering users to enhance productivity and efficiency in Excel-based workflows.

## **What is Autom Mate's Excel Library?**&#x20;

The Autom Mate Excel Library is a feature-rich toolkit designed to streamline Excel processes, enabling users to automate repetitive tasks, generate reports, and manipulate data seamlessly. By integrating these actions into workflows, users can achieve significant time savings and operational efficiency.

## Autom Mate Integration with Excel

Autom Mate's Excel library is designed to empower users with a robust set of tools for automating, manipulating, and optimizing Excel workbooks. Whether it's automating repetitive tasks, generating insightful reports, or managing data efficiently, this library offers a comprehensive suite of actions to streamline Excel-based workflows.

## **Using the Integration**

Before using the Autom Mate Excel Library actions, ensure you have integrated the library into your existing flow.

## **How to Use Actions**

<figure><img src="/files/qUtynOAkexOYEiiCAHwo" alt=""><figcaption><p>General View of Excel Actions into the Autom.</p></figcaption></figure>

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ1OFEZyLnYe7GBMqba5u%2Fuploads%2FgBwb5rWeoK4VVYjEMjZ3%2Fexcel%20autom%20mate%20(1).mp4?alt=media&token=dfe52b82-50e2-4a7a-ad1b-cbb8f11256f4>" %}
Example Usage of Excel
{% endembed %}

### **Copy**

<figure><img src="/files/BMP9jpmCQp0OSIgopDgo" alt=""><figcaption></figcaption></figure>

**Description:** The Copy Action allows users to duplicate rows, columns, or ranges from an Excel sheet.

**Purpose:** This action is useful for creating backups of data, manipulating data structures, or preparing data for further analysis.

**Usage:**

1. Select the data table variable of the Excel Sheet containing the data to be copied.
2. Choose the desired option:
   * "Row" or "Column": Specify the row or column data to copy, entering the corresponding value.
   * "Cell": Define the range to copy by entering the column and row values.
3. Assign a variable to store the copied data:
   * For "Row" or "Column" option: Select an array variable.
   * For "Cell" option: Select a string variable.

**Inputs:**

* Excel Source: <mark style="color:green;">The data table variable of the Excel Sheet.</mark>
* Range Type: <mark style="color:green;">Set Custom Range or Add to last row.</mark>
* Range: <mark style="color:green;">The specific range or cell to copy.</mark>
* Row contains index: <mark style="color:green;">A selectable box to include row index.</mark>
* Value: <mark style="color:green;">The value to be copied.</mark>

### **Create Pivot**

<figure><img src="/files/nDdXQRdA4cr7MQqZg9Kf" alt=""><figcaption></figcaption></figure>

**Description:** The Create Pivot Action is used to generate Pivot Table reports from Excel data.

**Purpose:** This action is helpful for summarizing and analyzing data, creating visual representations, and gaining insights from large datasets.

**Usage:**

1. Select the data table variable of the Excel Sheet.
2. Enter or Select the Pivot Table Range with the corresponding Sheet Name (e.g., Sheet1!$B$1:$F$8).
3. Specify the column names for Filter, Row Tags, Column Tags, and Values, pressing Enter after each name.

**Inputs:**

* Excel Source: <mark style="color:green;">The data table variable of the Excel Sheet.</mark>
* Enter Table Range: <mark style="color:green;">The range for the Pivot Table.</mark>
* Fields to add to the report: <mark style="color:green;">Tags for Filter, Row Tags, Column Tags, and Values.</mark>

### **Delete Cell**

<figure><img src="/files/zXD9f4IrhbNUE6QmKX0G" alt=""><figcaption></figcaption></figure>

**Description:** The Delete Cell Action removes specific cells within an Excel sheet.

**Purpose:** This action is useful for data cleanup, removing unwanted information, or preparing sheets for further processing.

**Usage:**

1. Ensure the Excel source variable type is "data table."
2. Define the location of the cell(s) to delete in the "range" section.
   * For example: A-1 for a single range, or A-10:B-20 for multiple ranges.

**Inputs:**

* Excel Source: <mark style="color:green;">The data table variable of the Excel Sheet.</mark>
* Range: <mark style="color:green;">The specific cell or range to delete.</mark>

### **Export to CSV**

<figure><img src="/files/ffccPwcPfzhTWYKIIrOF" alt=""><figcaption></figcaption></figure>

**Description:** The Export to CSV Action saves an Excel sheet as a CSV file.

**Purpose:** This action is helpful for sharing data with systems that require CSV format, archiving data, or preparing data for external use.

**Usage:**

1. Select the data table variable of the Excel Sheet to be exported.
2. Choose the Separator character for rows and columns.
3. Enter the Folder Path to save the CSV file (e.g., C:\Autommate\test).
4. Assign a string variable to store the CSV file path.

**Inputs:**

* Excel Source: <mark style="color:green;">The data table variable of the Excel Sheet.</mark>
* Separator: <mark style="color:green;">Comma or Semicolon.</mark>
* Folder Path: <mark style="color:green;">The location to save the CSV file.</mark>
* Assign file path to variable: <mark style="color:green;">A string variable to store the CSV file path.</mark>

### **Filter**

<figure><img src="/files/Pt6A4R7sVAQqg6eClxm3" alt=""><figcaption></figcaption></figure>

**Description:** The Filter Action allows users to filter data within an Excel sheet based on specified criteria.

**Purpose:** This action is essential for extracting specific subsets of data, performing data cleansing, or preparing data for analysis.

**Usage:**

1. Select the data table variable of the Excel Sheet.
2. Define the value to assign for filtering, using an array variable.

**Inputs:**

* Excel Source: <mark style="color:green;">The data table variable of the Excel Sheet.</mark>
* Value to assign: <mark style="color:green;">An array variable with filtering criteria.</mark>

### **Find**

<figure><img src="/files/VzLKTEgtfGjFTOhStC0u" alt=""><figcaption></figcaption></figure>

**Description:** The Find Action helps users search for specific values within an Excel sheet.

**Purpose:** This action is useful for locating specific data points, validating data presence, or identifying trends.

**Usage:**

1. Select the data table variable of the Excel Sheet.
2. Specify the value to search for, using an object variable.

**Inputs:**

* Excel Source: <mark style="color:green;">The datatable variable of the Excel Sheet.</mark>
* Value to assign: <mark style="color:green;">An object variable with the search criteria.</mark>

### **Insert / Delete Column**

<figure><img src="/files/DOjodUqgTVfEDMKjNWm5" alt=""><figcaption></figcaption></figure>

**Description:** This action facilitates the addition or removal of columns within an Excel sheet.

**Purpose:** Users can adjust the structure of their data, prepare data for analysis, or customize data views.

**Usage:**

1. Select the datatable variable of the Excel Sheet.
2. Choose "Insert Column At" to add new columns or "Delete Column(s) At" to remove columns.
3. Enter the column value(s) accordingly.

**Inputs:**

* Excel Source: <mark style="color:green;">The datatable variable of the Excel Sheet.</mark>
* Insert Column at: <mark style="color:green;">The column(s) to insert.</mark>
* Delete Column at: <mark style="color:green;">The column(s) to delete.</mark>

### **Insert / Delete Row**

<figure><img src="/files/Ljt32OwMRUKjSU0gtHbZ" alt=""><figcaption></figcaption></figure>

**Description:** The Insert / Delete Row Action allows users to add or remove rows within an Excel sheet.

**Purpose:** Users can adjust the length of their datasets, clean up data, or prepare for analysis.

**Usage:**

1. Select the datatable variable of the Excel Sheet.
2. Choose "Insert Row At" to add new rows or "Delete Row(s) At" to remove rows.
3. Enter the row value(s) accordingly.

**Inputs:**

* Excel Source: <mark style="color:green;">The datatable variable of the Excel Sheet.</mark>
* Insert Row at: <mark style="color:green;">The row(s) to insert.</mark>
* Delete Row at: <mark style="color:green;">The row(s) to delete.</mark>

### **New File**

<figure><img src="/files/deZAssJbfqAHABoDNVzW" alt=""><figcaption></figcaption></figure>

**Description:** The New File Action is used to create a new Excel sheet.

**Purpose:** Users can generate new workbooks, set up templates, or initialize new data structures.

**Usage:**

1. Define the File Name, Folder Path, and Sheet Name for the new Excel sheet.
2. Assign the file path to a specific string variable.

**Inputs:**

* File Name: <mark style="color:green;">The name of the new Excel file.</mark>
* Folder Path: <mark style="color:green;">The location to save the new Excel file.</mark>
* Sheet Name: <mark style="color:green;">The name of the new sheet.</mark>
* Assign file path to variable: <mark style="color:green;">A string variable to store the file path.</mark>

### **Paste**

<figure><img src="/files/qHUoMS9VmMxrulgOjvML" alt=""><figcaption></figcaption></figure>

**Description:** The Paste Action is used to insert copied data into an Excel sheet.

**Purpose:** This action helps in transferring data from one location to another within the same sheet or between sheets.

**Usage:**

1. Select the data table variable of the Excel Sheet to paste the data into.
2. Choose the appropriate option:
   * For "Row" or "Column": Select an array variable for the data.
   * For "Cell": Select a string variable for the data.
3. Specify the location to paste the data.

**Inputs:**

* Excel Source: <mark style="color:green;">The data table variable of the Excel Sheet.</mark>
* Value to Assign: <mark style="color:green;">For "Row" or "Column", select an array variable; for "Cell", select a string variable.</mark>
* For Row:
  * Add to last row: <mark style="color:green;">Selectable box (e.g., 1)</mark>
  * Row Number: <mark style="color:green;">Example - 1</mark>
* For Column:
  * Column Letter: <mark style="color:green;">Example - B</mark>
  * Column Name: <mark style="color:green;">Example - Hitchhiker</mark>

### **Read File**

<figure><img src="/files/M51erMqK2rH7LLCNrmy9" alt=""><figcaption></figcaption></figure>

**Description:** The Read Sheet Action allows users to retrieve data from an Excel sheet.

**Purpose:** Users can extract data for analysis, reporting, or further processing within their flows.

**Usage:**

1. Specify the File Path of the Excel sheet to read.
2. Choose the desired Open as option (Read only or Read Write).
3. Select the Data Format and the Sheet to read.

**Inputs:**

* File Path: <mark style="color:green;">The path to the Excel sheet to be read.</mark>
* Open as: <mark style="color:green;">Read only or Read Write.</mark>
* Date Format: <mark style="color:green;">Format of the date values in the sheet.</mark>
* Sheets: <mark style="color:green;">Specify the sheet name(s) to read.</mark>

{% hint style="info" %}

### **Hint**

For workflows involving files larger than **250 MB**, split the data into smaller, manageable segments before using the `readFile` action. This approach ensures compatibility and smooth processing.
{% endhint %}

{% hint style="danger" %}

### **Warning**

**File Size Limitation**

Files larger than **250 MB** cannot be processed with the `readFile` action. Ensure your files meet this size requirement to prevent errors or workflow disruptions.
{% endhint %}

***

### **Run Macro**

<figure><img src="/files/gHiZet2LW20knJxtpchM" alt=""><figcaption></figcaption></figure>

**Description:** The Run Macro Action executes a Macro script within an Excel sheet.

**Purpose:** Users can automate complex tasks, apply advanced calculations, or interact with external systems through macros.

**Usage:**

1. Select the Excel Source containing the Macro.
2. Check the "New Query" option if creating a new query.
3. Specify the Macro Name or select an existing macro.
4. Enter the File Path of the macro file or input the macro manually.

**Inputs:**

* Excel Source: <mark style="color:green;">The data table variable of the Excel Sheet.</mark>
* New Query: <mark style="color:green;">Selectable box for new query creation.</mark>
* Macro Name: <mark style="color:green;">The name of the macro to execute.</mark>

### **Save**

<figure><img src="/files/aPfErkc8bL9vNcUD1HSX" alt=""><figcaption></figcaption></figure>

**Description:** The Save Action is used to save changes made to the Excel sheet.

**Purpose:** Users can persist changes, save results of operations, or finalize data manipulation tasks.

**Usage:**

1. Select the data table variable(s) of the Excel Sheet(s) to be saved.
2. Enter the Folder Path to save the Excel Sheet(s).
3. Assign a string variable to store the path for future use.

**Inputs:**

* Sheets To Saved: <mark style="color:green;">The data table variable(s) of the Excel Sheet(s) to be saved.</mark>
* Folder Path: <mark style="color:green;">The location to save the Excel Sheet(s).</mark>
* Assign file path to variable: <mark style="color:green;">A string variable to store the file path.</mark>

### **Search**

<figure><img src="/files/Wo86dR3KjSRZdyCVcHbv" alt=""><figcaption></figcaption></figure>

**Description:** The Search Action helps users find specific values within an Excel sheet.

**Purpose:** Users can locate data points, verify data integrity, or filter for specific information.

**Usage:**

1. Specify the Excel Source containing the data to search.
2. Choose the Operator for the search criteria (e.g., =, is empty, contains).
3. Enter the Value to search for within the data.

**Inputs:**

* Excel Source: <mark style="color:green;">The data table variable of the Excel Sheet.</mark>
* Operator: <mark style="color:green;">The operator for the search criteria.</mark>
* Value To Search: <mark style="color:green;">The value to search for.</mark>
* Search all data or Search in column:
  * If searching in a column:
    * Column To Search: <mark style="color:green;">The column to search within.</mark>
    * Value to Assign: <mark style="color:green;">An array variable for results.</mark>

### **Set Cell Formula**

<figure><img src="/files/CpuSx9FLwtZ0HTaZDLOv" alt=""><figcaption></figcaption></figure>

**Description:** The Set Cell Formula Action adds formulas to cells within an Excel Sheet.

**Purpose:** Users can perform calculations, apply formulas, or automate data manipulation tasks.

**Usage:**

1. Select the data table variable of the Excel Sheet.
2. Specify the Cell Range where the formula will be added.
3. Enter the desired formula.

**Inputs:**

* Excel Source: <mark style="color:green;">The data table variable of the Excel Sheet.</mark>
* Range: <mark style="color:green;">The cell range where the formula will be added.</mark>
* Formula: <mark style="color:green;">The formula to apply to the cell range.</mark>

### **VLookUp**

<figure><img src="/files/kpEJxCO5dYyoacSgIcN6" alt=""><figcaption></figcaption></figure>

**Description:** The VLookUp Action performs a VLookUp operation within an Excel sheet.

**Purpose:** Users can search for and retrieve data from a specific table based on a lookup value.

**Usage:**

1. Select the data table variable of the Excel Sheet to perform the lookup.
2. Define the Searchable Column, Search Text, LookUp Data, and Find Column.
3. Check the Approximate Value option if required.

**Inputs:**

* Excel Source: <mark style="color:green;">The data table variable of the Excel Sheet.</mark>
* Searchable Column: <mark style="color:green;">The column to search within.</mark>
* Searchable Text: <mark style="color:green;">The text to search for.</mark>
* LookUp Data: <mark style="color:green;">The data range to search.</mark>
* Find Column: <mark style="color:green;">The column to return the value from.</mark>
* Approximate Value: <mark style="color:green;">Selectable box for approximate match.</mark>
* Source to be Assigned: <mark style="color:green;">A string variable for the VLookUp value.</mark>

### **Write Cell**

<figure><img src="/files/cjmiTOtTpn6iPyy5LCfP" alt=""><figcaption></figcaption></figure>

**Description:** The Write Cell Action sets a value within a specific cell or range in an Excel Sheet.

**Purpose:** Users can update data, insert new information, or automate cell value assignments.

**Usage:**

1. Select the data table variable of the Excel Sheet.
2. Choose the appropriate option:
   * "Set Custom Range": Specify the range for the value to be written.
   * "Add to Last Row": Write the value in the last row of the specified column.
3. Enter or choose the Value to be written to the cell(s).

**Inputs:**

* Excel source: <mark style="color:green;">The data table variable of the Excel Sheet.</mark>
* Range type:
  * Set custom range: <mark style="color:green;">The range for the value to be written.</mark>
  * Add to last row: <mark style="color:green;">The column to write the value in the last row.</mark>
* Row Contains Index: <mark style="color:green;">Selectable box for row index.</mark>
* Value: <mark style="color:green;">The value to write to the cell(s).</mark>

***

## Additional Tips

### [**Use Cases**](/userguide/use-cases.md)

### [FAQ](/userguide/faq.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.autommate.com/userguide/libraries/integration/excel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
