# import-from-spreadsheet-file

## Description

<mark style="color:purple;">`import-from-spreadsheet-file`</mark> *adaptor imports data from a spreadsheet file in one of the following file formats*: `.xlsx`, `.xls`, `.xlsm`, `.xlsb`, `.ods`, `.fods`, `.sylk`, `.html`, `.dif`, `.dbf`, `.rtf`, `.prn`, and `.eth`.

## Inputs

**`file`**\
Type: `file`\
Required: Yes\
The spreadsheet file in one of the following file formats: `.xlsx`, `.xls`, `.xlsm`, `.xlsb`, `.ods`, `.fods`, `.sylk`, `.html`, `.dif`, `.dbf`, `.prn`, and `.eth`.

**`sheet name`**\
Type: `text`\
Required: No\
The name of the sheet (tab) from which to import the data. If unspecified, the first sheet will be used.

**`range`**\
Type: `text`\
Required: No\
A valid range of cells (e.g. `A1:L512`) that contain data. If unspecified, the whole sheet will be included.

## Outputs

**`data`**\
Type: `datatable`\
A datatable containing the imported data.

## Examples

### Example 1: Default behaviour.

#### Inputs:

`file:` data.xlsx

`sheet name:` *null (empty)*

`range:` *null (empty)*

#### Outputs:

`data`:

| id       | latitude    | longitude    |
| -------- | ----------- | ------------ |
| Sample A | 4.642276772 | -8.17536836  |
| Sample B | 5.063345736 | -9.051186684 |
| Sample C | 5.063345736 | -9.051186684 |
| Sample D | 4.638091468 | -8.17536836  |

-> Imported the spreadsheet file `data.xlsx` into Data-flo.

### Example 2: Import data from spreadsheet within specific range.

#### Inputs:

`url:` data.xlsx

`sheet name:` *null (empty)*

`range:` A1:C4

#### Outputs:

`data`:

| id       | latitude    | longitude    |
| -------- | ----------- | ------------ |
| Sample A | 4.642276772 | -8.17536836  |
| Sample B | 5.063345736 | -9.051186684 |
| Sample C | 5.063345736 | -9.051186684 |

-> Imported the spreadsheet within the range `A1:C4`.


---

# 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://cgps.gitbook.io/data-flo/reference-guide/import-from-spreadsheet-file.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.
