> For the complete documentation index, see [llms.txt](https://docs.locoia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.locoia.com/connectors/helpers/xlsx-helper.md).

# XLSX Helper

Retrieving data and writing data into XLS and XLSX

## 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&amp;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&amp;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/helpers/spreadsheet-helper.md#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&amp;token=efa4b6b3-6298-47db-aeb7-f805c19ab0fe" alt="" width="563"><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.locoia.com/connectors/helpers/xlsx-helper.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
