# saulogm/advpl-excel architecture

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

- Interactive diagram: https://gitdiagram.com/saulogm/advpl-excel
- Repository: https://github.com/saulogm/advpl-excel

## Overview

advpl-excel is an ADVPL/TLPP library for creating, reading, and editing XLSX workbooks, with HTML export as an additional output. The main workflow is a caller using the workbook class to populate and format sheets, then save or read a workbook; formulas are calculated on save. The README documents broad capabilities but no source excerpts were supplied, so module-level call ownership beyond the documented formula and HTML behavior cannot be verified. Feature-module paths below follow the repository tree and names.

Main entry points: [`src/custom.excel.tlpp`](https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.tlpp) (XLSX workbook API), [`src/YEXCEL.prw`](https://github.com/saulogm/advpl-excel/blob/master/src/YEXCEL.prw) (Legacy YExcel API), [`src/custom.excel.calc.tlpp`](https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.calc.tlpp) (Formula calculation), [`src/custom.excel.html.tlpp`](https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.html.tlpp) (HTML export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workbook["Workbook operations"]
  node_xlsx["XLSX workbook API<br/>[custom.excel.tlpp]"]
  node_legacy["Legacy YExcel API<br/>[YEXCEL.prw]"]
  node_sheetdata["Cell and sheet data"]
  node_readwrite["Workbook read/write<br/>[custom.excel.tlpp]"]
end

subgraph group_presentation["Formatting and visuals"]
  node_styles["Styles and layout<br/>[custom.excel.tlpp]"]
  node_tables["Tables and filters<br/>[custom.excel.tlpp]"]
  node_charts["Charts"]
end

subgraph group_calculation["Calculation and data"]
  node_formulas["Formula API"]
  node_calcengine["Formula calculation"]
  node_calcfunctions["Calculation functions"]
end

subgraph group_export["Export and security"]
  node_crypto["Encryption and protection"]
  node_html["HTML export"]
end

node_caller(("Application caller"))

node_caller -->|"uses"| node_xlsx
node_caller -.->|"may use"| node_legacy
node_xlsx -->|"calculates on save"| node_calcengine
node_xlsx -->|"exports HTML"| node_html

click node_xlsx "https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.tlpp"
click node_legacy "https://github.com/saulogm/advpl-excel/blob/master/src/YEXCEL.prw"
click node_sheetdata "https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.dados.tlpp"
click node_readwrite "https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.tlpp"
click node_styles "https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.tlpp"
click node_tables "https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.tlpp"
click node_charts "https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.chart.tlpp"
click node_formulas "https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.formula.tlpp"
click node_calcengine "https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.calc.tlpp"
click node_calcfunctions "https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.calc.dat.tlpp"
click node_crypto "https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.crypto.tlpp"
click node_html "https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.html.tlpp"

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_xlsx,node_legacy,node_sheetdata,node_readwrite toneBlue
class node_styles,node_tables,node_charts toneAmber
class node_formulas,node_calcengine,node_calcfunctions toneMint
class node_crypto,node_html toneRose
class node_caller toneIndigo
```

## Components

### Workbook operations

- [XLSX workbook API](https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.tlpp): `src/custom.excel.tlpp`
- [Legacy YExcel API](https://github.com/saulogm/advpl-excel/blob/master/src/YEXCEL.prw): `src/YEXCEL.prw`
- [Cell and sheet data](https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.dados.tlpp): `src/custom.excel.dados.tlpp`
- [Workbook read/write](https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.tlpp): `src/custom.excel.tlpp`

### Formatting and visuals

- [Styles and layout](https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.tlpp): `src/custom.excel.tlpp`
- [Tables and filters](https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.tlpp): `src/custom.excel.tlpp`
- [Charts](https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.chart.tlpp): `src/custom.excel.chart.tlpp`

### Calculation and data

- [Formula API](https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.formula.tlpp): `src/custom.excel.formula.tlpp`
- [Formula calculation](https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.calc.tlpp): `src/custom.excel.calc.tlpp`
- [Calculation functions](https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.calc.dat.tlpp): `src/custom.excel.calc.dat.tlpp`

### Export and security

- [Encryption and protection](https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.crypto.tlpp): `src/custom.excel.crypto.tlpp`
- [HTML export](https://github.com/saulogm/advpl-excel/blob/master/src/custom.excel.html.tlpp): `src/custom.excel.html.tlpp`

### Other components

- **Application caller**

## Connections

- Application caller → XLSX workbook API: uses (evidence: `README.md`)
- Application caller → Legacy YExcel API: may use (evidence: `README.md`)
- XLSX workbook API → Formula calculation: calculates on save (evidence: `README.md`)
- XLSX workbook API → HTML export: exports HTML (evidence: `README.md`)
