xberg-extracting-tables
Was er macht
Dieser Skill zeigt, wie Tabellen aus Dokumenten mit layoutbewusster Erkennung gewonnen werden. Er ist für Menschen gedacht, die Finanzberichte, Rechnungen oder Forschungstabellen in brauchbarer Form benötigen.
Wann du ihn nutzt
- ✓Wenn du die Tabellen aus einem PDF-Bericht, einer Rechnung oder einem Finanzbericht brauchst.
- ✓Wenn du Tabellendaten als sauberes Markdown für eine KI zum Lesen willst.
- ✓Wenn du exakte Zellwerte in einer strukturierten Datei für andere Software brauchst.
Link zum Skill
https://github.com/xberg-io/xberg/blob/main/plugin/.ai-rulez/skills/xberg-extracting-tables/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Hol alle Tabellen aus diesem Finanzbericht als PDF als strukturierte Datei, die ich in einer Tabellenkalkulation öffnen kann.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Agent schaltet die Layout-Erkennung ein, damit das Werkzeug Tabellengrenzen findet, und liefert dann je nach gewählter Ausgabe entweder Markdown-Tabellen im Text oder eine strukturierte Liste von Zellen.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Extracting tables
Use this when the user wants structured tabular data — financial statements, scientific tables, invoices, spreadsheet-style PDFs. Xberg detects tables via a layout model (RT-DETR v2) and reconstructs cell structure with a configurable table model.
Basic usage
# Markdown tables embedded in the content stream
xberg extract report.pdf --layout --content-format markdown
# Structured JSON output, tables appear under result.tables
xberg extract report.pdf --layout --format json
--layout turns on layout-aware extraction; without it, tables fall back
to plain text reflow and you lose cell boundaries.
Output shapes
Two surfaces, picked via --format (CLI shape) and --content-format
(content rendering):
- Markdown tables in
content—--content-format markdown. Tables appear inline as| col | col |blocks. Good for LLM ingestion. - Structured
tablesarray —--format json. Each entry hascells[][](rows × cols),markdown(pre-rendered),page_number,bounding_box. Use this when downstream code needs exact cell access. (bounding_boxis omitted when no position data is available.)
Both are populated at once when --layout is on. The tables array is
always structured; the content stream switches representation.
xberg extract financials.pdf --layout --format json \
| jq '.result.tables[] | {page: .page_number, rows: (.cells | length)}'
Table models
--layout-table-model picks the reconstruction backend:
| Model | Best for | Notes |
|---|---|---|
tatr |
dense complex tables (academic, financial) | Default. Heaviest, highest accuracy. |
slanet_auto |
dispatches per-table to wired/wireless | Good when table styles are mixed. |
slanet_wired |
tables with visible borders | Faster than tatr. |
slanet_wireless |
tables without borders (whitespace-separated) | For invoices, simple grids. |
slanet_plus |
hybrid wired / wireless | Lighter than slanet_auto. |
disabled |
layout detection only, no table structure | Use to skip table model cost. |
xberg extract bank-statement.pdf \
--layout --layout-table-model tatr --content-format markdown
Drop --layout-confidence when the layout model misses tables (default
threshold ~0.5):
xberg extract noisy-scan.pdf --layout --layout-confidence 0.3
Spreadsheets
.xlsx, .ods, .csv, .tsv are extracted by dedicated parsers — no
layout model needed. Each sheet becomes a markdown table (or structured
table) automatically:
xberg extract workbook.xlsx --content-format markdown
xberg extract data.csv --format json
Pass --no-cache=true only when iterating on the same file with different
configs.
Config file alternative
# `output_format` in config files equals `--content-format` on the CLI.
output_format = "markdown"
[layout]
confidence_threshold = 0.5
table_model = "tatr"
Then:
xberg extract report.pdf --format json
Programmatic access
From Python, structured tables live on the document in the result envelope
(result.results[0].tables):
from xberg import ExtractInput, extract, ExtractionConfig, LayoutDetectionConfig
config = ExtractionConfig(
layout=LayoutDetectionConfig(table_model="tatr"),
output_format="markdown",
)
result = await extract(ExtractInput(uri="report.pdf"), config)
for table in result.results[0].tables:
print(table.markdown) # rendered markdown
print(table.cells[0][0]) # cell access
Node.js mirrors this (extract, output.results[0].tables, camelCase fields).
See ../../references/python-api.md and ../../references/nodejs-api.md for full type signatures.
Known limitations
- Merged cells — reconstructed as repeated values across the spanned region; the merge is not preserved as metadata.
- Rotated tables — enable
--ocr-auto-rotate truefor image-based PDFs before extraction. - Nested tables — flattened. Detection succeeds; structural nesting is lost.
- **Multi-page table
Häufige Fragen
Warum die Layout-Einstellung einschalten?
Ohne sie werden Tabellen als Fließtext umgebrochen und die Zellgrenzen gehen verloren.
Welche Ausgabe sollte ich wählen?
Markdown-Tabellen eignen sich zum Lesen durch KI, die strukturierte Liste eignet sich für Software, die exakte Zellen braucht.
Erkennt er Tabellen immer richtig?
Nein. Der Skill nennt bekannte Grenzen, prüfe das Ergebnis also am Originaldokument.
Details
Originalbeschreibung des Autors
Use when extracting tabular data from PDFs, spreadsheets, or images. Covers layout-aware table detection, table model selection, output formats (markdown / JSON cells), and known limits.
repo: xberg-io/xberg
Beliebtheit
- GitHub-Sterne
- 9.5k
- Platz im Ranking
- #12271
- Lizenz
- MIT
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
xberg-batch-extraction
9.5kHilft deinem Agenten, viele Dokumente auf einmal mit Xberg zu verarbeiten, mit einer gemeinsamen Optionsliste, begrenzter Parallelität und ohne dass fehlerhafte Dateien den Lauf stoppen.
xberg-chunking
9.5kHilft deinem Agenten, langen Dokumenttext für KI-Prompts oder Suchindizes in kleinere Abschnitte zu teilen, mit festen Größen und optionaler Überlappung.
xberg-extracting-keywords
9.5kHilft deinem Agenten, die wichtigsten Schlagwörter oder Kernphrasen aus einem Dokument zu holen und seine Sprache zu erkennen, mit Xbergs Schlagwort-Einstellungen.
xberg-extracting-with-ocr
9.5kHilft deinem Agenten, Text aus gescannten PDFs, Fotos und Bildern ohne Textebene zu lesen, mit OCR und optionalen Sprachpaketen.
Ähnliche Skills
feishu-doc
394kHilft deinem Agenten, Feishu-Cloud-Dokumente zu lesen, zu erstellen und zu bearbeiten, einschließlich Text, Bildern und Tabellen, über das Dokument-Werkzeug.
feishu-drive
394kLässt deinen Agenten Dateien in einem Feishu-Cloud-Ordner durchsehen, ordnen und kommentieren, der mit dem Bot geteilt wurde.
feishu-perm
394kHilft deinem Agenten zu prüfen und zu ändern, wer auf eine Feishu-Datei zugreifen darf, und wählt dabei die kleinste Berechtigung, die deine Anfrage erfüllt.