# digikv/xlsx architecture

> Architecture diagram of the GitHub repository digikv/xlsx, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/digikv/xlsx
- Repository: https://github.com/digikv/xlsx

## Overview

This is a small, single-file Harbour library for creating and reading Excel workbooks without Excel or external DLLs. The principal workflow is to create a workbook, obtain worksheets, populate cells and workbook features, then save; the library also reads existing workbooks for inspection or modification. The README documents these capabilities, but no source excerpts were provided, so relationships below are limited to documented API usage and capabilities.

Main entry points: [`XLSXClass.prg`](https://github.com/digikv/xlsx/blob/main/XLSXClass.prg) (Workbook API)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Harbour application"))
node_workbook["Workbook API<br/>[XLSXClass.prg]"]
node_worksheet["Worksheet API<br/>[XLSXClass.prg]"]
node_cells["Cells and formulas<br/>[XLSXClass.prg]"]
node_presentation["Styles and layout<br/>[XLSXClass.prg]"]
node_media["Drawings and charts<br/>[XLSXClass.prg]"]
node_reader["Workbook reader<br/>[XLSXClass.prg]"]
node_xlsx["XLSX file"]

node_user -->|"creates"| node_workbook
node_workbook -->|"gets or creates"| node_worksheet
node_user -->|"writes values"| node_cells
node_user -->|"defines formatting"| node_presentation
node_user -->|"adds content"| node_media
node_workbook -->|"saves"| node_xlsx
node_xlsx -->|"reads"| node_reader
node_reader -->|"supports changes"| node_workbook

click node_workbook "https://github.com/digikv/xlsx/blob/main/XLSXClass.prg"
click node_worksheet "https://github.com/digikv/xlsx/blob/main/XLSXClass.prg"
click node_cells "https://github.com/digikv/xlsx/blob/main/XLSXClass.prg"
click node_presentation "https://github.com/digikv/xlsx/blob/main/XLSXClass.prg"
click node_media "https://github.com/digikv/xlsx/blob/main/XLSXClass.prg"
click node_reader "https://github.com/digikv/xlsx/blob/main/XLSXClass.prg"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_user,node_xlsx toneIndigo
class node_workbook,node_worksheet toneMint
class node_cells,node_presentation,node_media,node_reader toneTeal
```

## Components

### Other components

- **Harbour application**
- [Workbook API](https://github.com/digikv/xlsx/blob/main/XLSXClass.prg): `XLSXClass.prg`
- [Worksheet API](https://github.com/digikv/xlsx/blob/main/XLSXClass.prg): `XLSXClass.prg`
- [Cells and formulas](https://github.com/digikv/xlsx/blob/main/XLSXClass.prg): `XLSXClass.prg`
- [Styles and layout](https://github.com/digikv/xlsx/blob/main/XLSXClass.prg): `XLSXClass.prg`
- [Drawings and charts](https://github.com/digikv/xlsx/blob/main/XLSXClass.prg): `XLSXClass.prg`
- [Workbook reader](https://github.com/digikv/xlsx/blob/main/XLSXClass.prg): `XLSXClass.prg`
- **XLSX file**

## Connections

- Harbour application → Workbook API: creates (evidence: `README.md`)
- Workbook API → Worksheet API: gets or creates (evidence: `README.md`)
- Harbour application → Cells and formulas: writes values (evidence: `README.md`)
- Harbour application → Styles and layout: defines formatting (evidence: `README.md`)
- Harbour application → Drawings and charts: adds content (evidence: `README.md`)
- Workbook API → XLSX file: saves (evidence: `README.md`)
- XLSX file → Workbook reader: reads (evidence: `README.md`)
- Workbook reader → Workbook API: supports changes (evidence: `README.md`)
