Parse complex tables from CSV, XLSX, and DOCX into JSON/Markdown/HTML)
Project description
# 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
from table2llm import CsvParser
parser = CsvParser()
result = parser.parse_to_json("data.csv")
print(result)
XLSX
from table2llm import XlsxParser
parser = XlsxParser()
result = parser.parse_to_md("data.xlsx")
print(result)
DOCX
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
table2llm-0.1.0.tar.gz
(7.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file table2llm-0.1.0.tar.gz.
File metadata
- Download URL: table2llm-0.1.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af7b787138c5259cc8f732e5c69fa3165f1a3defe0478cabb993b24e98778a37
|
|
| MD5 |
ff03e1c8777f24a401dbc39482b87955
|
|
| BLAKE2b-256 |
472689ccf0f38f70d1ae595954020c9802b9d87a44275c34b3b1efc368008653
|
File details
Details for the file table2llm-0.1.0-py3-none-any.whl.
File metadata
- Download URL: table2llm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e03563671306b54e4df5f83f5ca9e2b59f389b8cddc5752f9ae032e3c08f1ed5
|
|
| MD5 |
2218d2f0316f49dea54c05dedd32cf51
|
|
| BLAKE2b-256 |
4f1d7b345644410c0833c34c95e3b81656bb4303b4a155a3a51fecd99fcf07cf
|