
π This article includes 1 downloadable practice file β
Free-form paragraphs are hard to reuse. Ask for structure, and the output can go straight into Excel, a database or another program.
Tables for Excel
“Extract invoice number, date (dd-mm-yyyy), vendor, GSTIN and amount from the text below as a table.” Copy the table and paste into Excel; columns line up.
CSV
“β¦as CSV with a header row, comma-separated, amounts without commas.” Save as .csv or paste with Data βΊ Text to Columns.
JSON with a schema
Return JSON only, no explanation, with exactly these keys:
{"invoice_no": string, "date": "YYYY-MM-DD", "vendor": string, "gstin": string or null, "amount": number}
If a value is missing, use null.
Fixed keys, types and a rule for missing values make the output predictable. Many APIs also have a “structured output / JSON mode” that enforces the schema.
Practice
Try the three extraction formats with your own invoice or email text (remove anything confidential first).
π Practice files for this article
- πLesson 5 prompt worksheetCopy-paste prompts and exercises to try in ChatGPT, Copilot, Gemini or Claude.β¬ TXT Β· 326 B
Free to use for learning. Files with macros (.bas) are plain text β import them with Alt+F11 β File β Import File, and always test on a copy.
Stuck on a step? Ask a question and the AI answers using this article.