# thang199801666/xlpp architecture

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

- Interactive diagram: https://gitdiagram.com/thang199801666/xlpp
- Repository: https://github.com/thang199801666/xlpp

## Overview

XL++ is a C++20 Excel-workbook library with C, Python, and C# interfaces. The main workflow is to create or load a workbook, edit worksheets and cells (optionally calculating formulas), then save or stream the result in supported spreadsheet formats. Package I/O handles OOXML and ZIP-based workbooks; separate legacy readers and writers cover XLS and XLSB, while CSV is also supported. Charts, pivots, styles, VBA, encryption, and preservation are meaningful capabilities. The tree and README support these subsystem boundaries; wiring among unsampled implementation details is left unspecified.

Main entry points: [`include/XLPP/Workbook/Workbook.h`](https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Workbook/Workbook.h) (Workbook), [`src/XLPP/Workbook/WorkbookIO.cpp`](https://github.com/thang199801666/xlpp/blob/main/src/XLPP/Workbook/WorkbookIO.cpp) (Workbook I/O), [`include/XLPP/Worksheet/Worksheet.h`](https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Worksheet/Worksheet.h) (Worksheet), [`include/XLPP/XLPP.h`](https://github.com/thang199801666/xlpp/blob/main/include/XLPP/XLPP.h) (C++ API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Public interfaces"]
  node_cpp_api["C++ API<br/>[XLPP.h]"]
  node_c_api["C ABI<br/>[xlpp_capi.cpp]"]
  node_python_api["Python API<br/>[xlpp_bindings.cpp]"]
  node_csharp_api["C&#35; API<br/>[XlppNet.cs]"]
end

subgraph group_model["Workbook model"]
  node_workbook["Workbook<br/>[Workbook.h]"]
  node_worksheet["Worksheet<br/>[Worksheet.h]"]
  node_cell_range["Cells and ranges<br/>[Cell.h]"]
end

subgraph group_formats["Format I/O"]
  node_streaming["Streaming I/O"]
  node_workbook_io["Workbook I/O<br/>[WorkbookIO.cpp]"]
  node_legacy_io["XLS and XLSB"]
end

subgraph group_features["Workbook features"]
  node_styles["Styles<br/>[Style.h]"]
  node_formula["Formula calculation"]
  node_charts["Charts and drawings<br/>[Chart.h]"]
  node_pivots["Pivot tables<br/>[PivotTable.h]"]
  node_worksheet_features["Worksheet features<br/>[Worksheet.h]"]
  node_vba["VBA support<br/>[VbaModule.h]"]
  node_encryption["Office encryption<br/>[Encryption.h]"]
end

subgraph group_engine["Internal engines"]
  node_packaging["Package and ZIP<br/>[ZipArchive.cpp]"]
  node_xml["XML processing<br/>[XmlPullReader.cpp]"]
  node_preservation["Part preservation<br/>[Preservation.h]"]
end

node_app(("Application"))

node_app -->|"uses"| node_cpp_api
node_app -->|"uses"| node_c_api
node_app -->|"uses"| node_python_api
node_app -->|"uses"| node_csharp_api
node_cpp_api -->|"creates or accesses"| node_workbook
node_c_api -->|"wraps"| node_workbook
node_python_api -->|"binds"| node_workbook
node_csharp_api -->|"wraps"| node_workbook
node_workbook -->|"manages"| node_worksheet
node_worksheet -->|"exposes"| node_cell_range
node_cell_range -->|"formats with"| node_styles
node_workbook -->|"calculates"| node_formula
node_workbook -->|"supports"| node_charts
node_workbook -->|"supports"| node_pivots
node_worksheet -->|"supports"| node_worksheet_features
node_workbook -->|"preserves"| node_vba
node_workbook -->|"saves or loads encrypted"| node_encryption
node_workbook -->|"loads or saves"| node_workbook_io
node_workbook -->|"streams"| node_streaming
node_workbook_io -->|"dispatches legacy formats"| node_legacy_io
node_workbook_io -->|"reads or writes package"| node_packaging
node_packaging -->|"parses or emits XML"| node_xml
node_workbook_io -->|"preserves untouched parts"| node_preservation

click node_cpp_api "https://github.com/thang199801666/xlpp/blob/main/include/XLPP/XLPP.h"
click node_c_api "https://github.com/thang199801666/xlpp/blob/main/bindings/c/xlpp_capi.cpp"
click node_python_api "https://github.com/thang199801666/xlpp/blob/main/bindings/python/src/xlpp_bindings.cpp"
click node_csharp_api "https://github.com/thang199801666/xlpp/blob/main/bindings/csharp/XlppNet.cs"
click node_workbook "https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Workbook/Workbook.h"
click node_worksheet "https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Worksheet/Worksheet.h"
click node_cell_range "https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Cell/Cell.h"
click node_styles "https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Styles/Style.h"
click node_formula "https://github.com/thang199801666/xlpp/blob/main/src/XLPP/Formula/CalculationEngine.cpp"
click node_charts "https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Chart/Chart.h"
click node_pivots "https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Pivot/PivotTable.h"
click node_worksheet_features "https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Worksheet/Worksheet.h"
click node_vba "https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Vba/VbaModule.h"
click node_encryption "https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Encryption/Encryption.h"
click node_streaming "https://github.com/thang199801666/xlpp/blob/main/src/XLPP/Streaming/StreamingWorkbookReader.cpp"
click node_workbook_io "https://github.com/thang199801666/xlpp/blob/main/src/XLPP/Workbook/WorkbookIO.cpp"
click node_legacy_io "https://github.com/thang199801666/xlpp/blob/main/src/XLPP/Legacy/XlsBinaryReader.cpp"
click node_packaging "https://github.com/thang199801666/xlpp/blob/main/src/XLPP/Packaging/ZipArchive.cpp"
click node_xml "https://github.com/thang199801666/xlpp/blob/main/src/XLPP/XML/XmlPullReader.cpp"
click node_preservation "https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Package/Preservation.h"

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_cpp_api,node_c_api,node_python_api,node_csharp_api toneBlue
class node_workbook,node_worksheet,node_cell_range toneAmber
class node_streaming,node_workbook_io,node_legacy_io toneMint
class node_styles,node_formula,node_charts,node_pivots,node_worksheet_features,node_vba,node_encryption toneRose
class node_packaging,node_xml,node_preservation,node_app toneIndigo
```

## Components

### Public interfaces

- [C++ API](https://github.com/thang199801666/xlpp/blob/main/include/XLPP/XLPP.h): `include/XLPP/XLPP.h`
- [C ABI](https://github.com/thang199801666/xlpp/blob/main/bindings/c/xlpp_capi.cpp): `bindings/c/xlpp_capi.cpp`
- [Python API](https://github.com/thang199801666/xlpp/blob/main/bindings/python/src/xlpp_bindings.cpp): `bindings/python/src/xlpp_bindings.cpp`
- [C# API](https://github.com/thang199801666/xlpp/blob/main/bindings/csharp/XlppNet.cs): `bindings/csharp/XlppNet.cs`

### Workbook model

- [Workbook](https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Workbook/Workbook.h): `include/XLPP/Workbook/Workbook.h`
- [Worksheet](https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Worksheet/Worksheet.h): `include/XLPP/Worksheet/Worksheet.h`
- [Cells and ranges](https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Cell/Cell.h): `include/XLPP/Cell/Cell.h`

### Format I/O

- [Streaming I/O](https://github.com/thang199801666/xlpp/blob/main/src/XLPP/Streaming/StreamingWorkbookReader.cpp): `src/XLPP/Streaming/StreamingWorkbookReader.cpp`
- [Workbook I/O](https://github.com/thang199801666/xlpp/blob/main/src/XLPP/Workbook/WorkbookIO.cpp): `src/XLPP/Workbook/WorkbookIO.cpp`
- [XLS and XLSB](https://github.com/thang199801666/xlpp/blob/main/src/XLPP/Legacy/XlsBinaryReader.cpp): `src/XLPP/Legacy/XlsBinaryReader.cpp`

### Workbook features

- [Styles](https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Styles/Style.h): `include/XLPP/Styles/Style.h`
- [Formula calculation](https://github.com/thang199801666/xlpp/blob/main/src/XLPP/Formula/CalculationEngine.cpp): `src/XLPP/Formula/CalculationEngine.cpp`
- [Charts and drawings](https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Chart/Chart.h): `include/XLPP/Chart/Chart.h`
- [Pivot tables](https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Pivot/PivotTable.h): `include/XLPP/Pivot/PivotTable.h`
- [Worksheet features](https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Worksheet/Worksheet.h): `include/XLPP/Worksheet/Worksheet.h`
- [VBA support](https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Vba/VbaModule.h): `include/XLPP/Vba/VbaModule.h`
- [Office encryption](https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Encryption/Encryption.h): `include/XLPP/Encryption/Encryption.h`

### Internal engines

- [Package and ZIP](https://github.com/thang199801666/xlpp/blob/main/src/XLPP/Packaging/ZipArchive.cpp): `src/XLPP/Packaging/ZipArchive.cpp`
- [XML processing](https://github.com/thang199801666/xlpp/blob/main/src/XLPP/XML/XmlPullReader.cpp): `src/XLPP/XML/XmlPullReader.cpp`
- [Part preservation](https://github.com/thang199801666/xlpp/blob/main/include/XLPP/Package/Preservation.h): `include/XLPP/Package/Preservation.h`

### Other components

- **Application**

## Connections

- Application → C++ API: uses
- Application → C ABI: uses
- Application → Python API: uses
- Application → C# API: uses
- C++ API → Workbook: creates or accesses
- C ABI → Workbook: wraps
- Python API → Workbook: binds
- C# API → Workbook: wraps
- Workbook → Worksheet: manages
- Worksheet → Cells and ranges: exposes
- Cells and ranges → Styles: formats with
- Workbook → Formula calculation: calculates
- Workbook → Charts and drawings: supports
- Workbook → Pivot tables: supports
- Worksheet → Worksheet features: supports
- Workbook → VBA support: preserves
- Workbook → Office encryption: saves or loads encrypted
- Workbook → Workbook I/O: loads or saves
- Workbook → Streaming I/O: streams
- Workbook I/O → XLS and XLSB: dispatches legacy formats
- Workbook I/O → Package and ZIP: reads or writes package
- Package and ZIP → XML processing: parses or emits XML
- Workbook I/O → Part preservation: preserves untouched parts
