Metadata-Version: 2.4
Name: table2llm
Version: 0.1.0
Summary: Parse complex tables from CSV, XLSX, and DOCX into JSON/Markdown/HTML)
License: MIT
Keywords: tables,llm,parsing,excel,docx,csv,xlsx
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: lxml>=6.0.2
Requires-Dist: openpyxl>=3.1.5
Requires-Dist: pydantic>=2.12.5

````md
# table2llm

Parse complex tables from CSV, XLSX, and DOCX into LLM-friendly formats such as JSON, Markdown, and HTML.

---

## Features

- Supports:
  - CSV
  - XLSX (Excel)
  - DOCX (Word tables)
- Handles:
  - Merged cells (rowspan / colspan)
  - Nested tables (DOCX)
- Outputs:
  - JSON (structured records)
  - Markdown
  - HTML

---

## Installation

pip install table2llm
````

---

## Usage

### CSV

```python
from table2llm import CsvParser

parser = CsvParser()
result = parser.parse_to_json("data.csv")

print(result)
```

---

### XLSX

```python
from table2llm import XlsxParser

parser = XlsxParser()
result = parser.parse_to_md("data.xlsx")

print(result)
```

---

### DOCX

```python
from table2llm import DocxParser

parser = DocxParser()
result = parser.parse_to_html("data.docx")

print(result)
```

---

## Output Formats

### JSON

* Structured as list of records
* Suitable for LLM ingestion

### Markdown

* Clean table format
* Useful for prompts or documentation

### HTML

* Preserves structure (rowspan / colspan)
* Best for rendering

---

## Notes

* Choose parser based on file type
* Empty rows are skipped
* Text is normalized and cleaned internally

---
