# Learn xlspy

This tutorial takes you from an empty Python file to a polished, automated Excel report. Each lesson is short, runnable, and builds on the previous one.

### 1\. [Installation](<https://justybase.github.io/xlspy/learn/installation/index.md>)

Install xlspy, verify the native extension, and pick the optional extras.

### 2\. [Your first workbook](<https://justybase.github.io/xlspy/learn/first-workbook/index.md>)

Write a styled XLSX report with headers, number formats and frozen panes.

### 3\. [XLSB in one line](<https://justybase.github.io/xlspy/learn/xlsb/index.md>)

Switch the same report to binary XLSB without changing the API.

### 4\. [Styles and number formats](<https://justybase.github.io/xlspy/learn/styles/index.md>)

Apply colors, borders, alignment, column widths and per-cell styles.

### 5\. [Formulas, tables and charts](<https://justybase.github.io/xlspy/learn/objects/index.md>)

Add formulas, an Excel table, data validation and a chart.

### 6\. [DataFrames](<https://justybase.github.io/xlspy/learn/dataframes/index.md>)

Export pandas and polars data, with formats and missing values.

### 7\. [Reading a workbook](<https://justybase.github.io/xlspy/learn/reading/index.md>)

Stream values with `ExcelReader` or load an editable model.

### 8\. [Updating a template](<https://justybase.github.io/xlspy/learn/updating/index.md>)

Replace a template's data while keeping its styles, sheets and macros.

### 9\. [Streaming a large export](<https://justybase.github.io/xlspy/learn/streaming/index.md>)

Write millions of rows from a generator with bounded memory.

### 10\. [Next steps](<https://justybase.github.io/xlspy/learn/next-steps/index.md>)

Where to go after the tutorial: how-to guides, reference and examples.

## Before you start

You need Python 3.11 or newer. Microsoft Excel is not required. If you want to run the DataFrame lesson, install pandas or polars as well.

```
python --version
pip install xlspy
```

Every lesson runs from a normal Python script. Commands are shown for a shell; use PowerShell on Windows if you prefer.

> [!TIP]
>
> **Follow along in a scratch directory**
>
> Create an empty folder, save each lesson as `lesson.py`, and run it with `python lesson.py`. The files the lesson creates appear next to it.

[Start with installation →](<https://justybase.github.io/xlspy/learn/installation/index.md>)
