Status: Internal guide (v1, English) Audience: All team members who create customer reports with AI support Scope: How to turn an Excel workbook into a professional, presentation-ready PDF report – what to do, what to tell the AI, and how to keep the process fast and reliable.
Instead of manually building PowerPoint/Word reports from Excel data, the AI agent reads the workbook directly (all sheets, cell values and cell colors) and generates a multi-page A4 PDF with:
The output is saved with the same name as the Excel file in a fixed folder: /home/user/Documents/generatedpdf/.
- Upload: Send the Excel file (`.xlsx`) as a chat attachment (or drop it into `Documents/inbox/`). - Prompt: Tell the AI what to build – language, style, output location. See the template in Section 3. - Analysis: The AI reads every sheet and cell, classifies statuses, computes KPIs, builds charts and renders the PDF. No data is copied by hand – nothing is lost or mistyped. - Delivery: The finished PDF appears in chat and on disk under its original filename. - Review & iterate: If something must change (wording, color, missing column), say it in one short message – the report is regenerated. Do not re-upload the file for small fixes.
Typical total time for a 300+ line workbook: a few minutes.
Copy, fill the brackets, paste into a fresh chat together with the Excel attachment:
Read the attached Excel file "[FILENAME].xlsx" completely (all sheets, all cells, including cell colors used as status legend). Then create ONE professional PDF report in [GERMAN / ENGLISH] for a customer presentation. Requirements: - Same filename as the Excel file, saved to /home/user/Documents/generatedpdf/ - Cover page with the 4–5 most important numbers - Executive summary: KPI cards + one status overview chart - Charts: distribution by [AREA / CATEGORY / DATE – pick what fits the data] - Full detail table(s) of ALL rows – do not shorten or sample the data - Section "Open items & recommended next steps" derived from the status notes - Clean, modern design (dark blue cover, white content pages), A4 - Keep all original values and notes unchanged; only reformat the presentation After finishing: show me the PDF in chat.
Tips for a good prompt
The AI chat has a limited memory window (“context”). Everything inside one chat – uploaded files, generated code, rendered pages – counts against it. A full workbook plus its report can consume a large share. Follow these rules:
- Start a NEW CHAT for every new document. Do not chain multiple Excel files in one conversation – the old report's data stays in memory, slows everything down, and can degrade quality or break the generation. - Delete working files after delivery. Ask once per chat: *“delete all temporary work files (scripts, images, HTML) from /tmp”*. The finished PDFs in `Documents/generatedpdf/` stay – those are the deliverables. - Delete old, unused chats in the chat list regularly. Finished project chats that you no longer need are safe to remove and free up space for future sessions. - Keep iterations short. One fix = one short message (“fix the typo on page 3”). Do not paste long explanations or screenshots of whole pages – that burns context fast. - If a chat gets very long or starts acting strange: start a new chat, re-upload the Excel file (it arrives fresh), and paste the same prompt from Section 3. The report is rebuilt from the file, not from the old chat – nothing is lost. - One document per chat keeps every run fast and identical in quality.
| Component | Used for |
|---|---|
| Python 3 + openpyxl | Reading `.xlsx` values, formulas (cached results) and cell colors |
| matplotlib | All charts (donut, bar charts), exported as high-resolution PNG |
| WeasyPrint | Renders the styled HTML/CSS layout to an A4 PDF with headers/footers/page breaks |
| pdftoppm | Page previews for the AI's own quality check before delivery |
Pipeline: Excel → parsed into structured data (JSON) → statistics & KPIs computed → chart PNGs generated → single styled HTML document → PDF rendered to /home/user/Documents/generatedpdf/.
File locations
Example commands used internally (for IT reference):
# inspect a workbook python3 -c "import openpyxl; wb=openpyxl.load_workbook('file.xlsx'); print(wb.sheetnames)" # render HTML to A4 PDF python3 -c "from weasyprint import HTML; HTML('report.html').write_pdf('out.pdf')" # generate page previews for visual QA pdftoppm -png -r 80 out.pdf preview
Summary in one line: upload the Excel, paste the prompt from Section 3 into a fresh chat, review the PDF that appears – then clean up and close the chat. One document per chat, always.