# XLSX Helper

## Overview&#x20;

The XLSX Helper helps in retrieving data and writing data into XLS and XLSX. It integrates them in other Locoia flow components.

<figure><img src="https://291121471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McrRFZHYH27bqKzOVDd%2Fuploads%2Ff7yPySRO8nEzxJAhahhG%2Fimage.png?alt=media&#x26;token=3b3503d5-0600-49cb-941c-86347d77a6f1" alt="" width="168"><figcaption></figcaption></figure>

## Actions

### Write sheet

In order to write and create a new XLSX file, just reference a list where your data that you want to write is located. All settings:

* **Data reference**: The reference to a file of a previous step in the flow builder or a file based on another server (somewhere on the internet). This can either be a list of lists or a dictionary (JSON):\
  \- List example: `[["ID", "Name"], ["123", "Markus"], ["124", "Peter"]]`\
  \- Dictionary (JSON): `[{"ID": "123", "Name": "Markus"}, {"ID": "124", "Name": "Peter"}]`

<figure><img src="https://291121471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McrRFZHYH27bqKzOVDd%2Fuploads%2FeOb56hlGinHhOevuy8As%2Fimage.png?alt=media&#x26;token=2edf0de2-2744-483d-ae7d-383263316d72" alt="" width="563"><figcaption></figcaption></figure>

### Read sheet

In order to read an XLSX / XLS-file, just reference the file and the sheet (by sheet name), where the data you want to read is stored. All settings:

* **URL where the XLSX / XLS file is located**: the URL either internal from DI or external from a third party
* **Sheet**: Name (tab) of the sheet within the file (optional). If none is selected, the first is used.
* **From**: Cell in the spreadsheet where the range to read should start, e.g. B7
* **To**: Cell in the spreadsheet where the range to read should end, e.g. F500
* **Import type**:&#x20;
  * with\_header: Returns a labeled dataset \[{"ID": "123", "Name": "Markus"}, {"ID": "124", "Name": "Peter"}]
  * with\_header: Returns all the values of the table-document as a simple list of lists \[\["ID", "Name"], \["123", "Markus"], \["124",  "Peter"]]
  * has\_no\_header: Returns the unlabeled dataset, just without the first row
* **Infer data types**: Whether to infer data types or import all data as strings (off by default). [More information can be found here](https://docs.locoia.com/connectors/spreadsheet-helper#infer-data-types)

<figure><img src="https://291121471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McrRFZHYH27bqKzOVDd%2Fuploads%2FkdfJiBg2uDnrJMs2o2SF%2Fimage.png?alt=media&#x26;token=efa4b6b3-6298-47db-aeb7-f805c19ab0fe" alt="" width="563"><figcaption></figcaption></figure>
