> ## Documentation Index
> Fetch the complete documentation index at: https://jetxl.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> From a DataFrame to a formatted spreadsheet

Jetxl reads Arrow memory. Polars, Pandas and PyArrow can all hand it Arrow, so the only difference between them is how you get there.

## Write a sheet

<Tabs>
  <Tab title="Polars">
    ```python theme={null}
    import polars as pl
    import jetxl as jet

    df = pl.DataFrame({
        "Name": ["Alice", "Bob", "Charlie"],
        "Age": [25, 30, 35],
        "Salary": [50000.0, 60000.0, 75000.0],
    })

    jet.write_sheet_arrow(df.to_arrow(), "output.xlsx")
    ```
  </Tab>

  <Tab title="Pandas">
    ```python theme={null}
    import pandas as pd
    import jetxl as jet

    df = pd.DataFrame({
        "Name": ["Alice", "Bob", "Charlie"],
        "Age": [25, 30, 35],
        "Salary": [50000.0, 60000.0, 75000.0],
    })

    jet.write_sheet_arrow(df.to_arrow(), "output.xlsx")
    ```
  </Tab>

  <Tab title="PyArrow">
    ```python theme={null}
    import pyarrow as pa
    import jetxl as jet

    table = pa.table({
        "Name": ["Alice", "Bob", "Charlie"],
        "Age": [25, 30, 35],
        "Salary": [50000.0, 60000.0, 75000.0],
    })

    jet.write_sheet_arrow(table, "output.xlsx")
    ```
  </Tab>

  <Tab title="Plain dicts">
    ```python theme={null}
    import jetxl as jet

    data = {
        "Name": ["Alice", "Bob", "Charlie"],
        "Age": [25, 30, 35],
        "Salary": [50000.0, 60000.0, 75000.0],
    }

    jet.write_sheet(data, "output.xlsx")
    ```

    You don't need a DataFrame library for this path, but it's slower and supports fewer options. See [the dictionary functions](/reference/dict-api).
  </Tab>
</Tabs>

<Note>
  `.to_arrow()` on a Polars or Pandas frame is a conversion, not a copy of the data. It's what lets Jetxl read your values in place. Polars DataFrames also work when passed directly, without the call.
</Note>

## Make it presentable

The defaults produce a plain grid. Four arguments turn it into something you'd send to someone:

```python theme={null}
jet.write_sheet_arrow(
    df.to_arrow(),
    "output.xlsx",
    sheet_name="Employees",
    styled_headers=True,   # bolds the header row
    freeze_rows=1,         # header stays visible when scrolling
    auto_filter=True,      # filter dropdowns on each column
    auto_width=True,       # size columns to their contents
)
```

<Tip>
  If you only ever remember four options, remember these. They account for most of the difference between a raw export and a readable one.
</Tip>

## Format the numbers

Raw floats read poorly. Name a format per column:

```python theme={null}
jet.write_sheet_arrow(
    df.to_arrow(),
    "output.xlsx",
    styled_headers=True,
    column_formats={
        "Salary": "currency",   # $50,000.00
        "Age": "integer",       # 25
    },
)
```

There are sixteen built-in names, and any Excel format code also works. See [Number formats](/guides/number-formats).

## Where to go next

<Columns cols={2}>
  <Card title="Conventions" icon="ruler-combined" href="/guides/conventions">
    Colors, indexing, and error behavior.
  </Card>

  <Card title="Formatting basics" icon="wand-magic-sparkles" href="/guides/formatting-basics">
    Headers, widths, freezing, filters.
  </Card>

  <Card title="Charts" icon="chart-column" href="/guides/charts">
    Six chart types with full styling.
  </Card>

  <Card title="Recipes" icon="book-open" href="/recipes/sales-report">
    Complete scripts for whole reports.
  </Card>
</Columns>
