Add PDF and CSV export for analysis reports #1416

Closed
opened 2026-03-30 18:24:06 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P3 -- Export analysis reports

Users currently cannot download analysis results. Adding export functionality would make SPARC more useful for sharing findings outside the dashboard.

What to do

  • Add a backend endpoint (e.g., GET /analyze/{job_id}/export?format=pdf|csv) that serialises the analysis result.
  • For CSV: use Python's csv module or pandas.
  • For PDF: use a library such as weasyprint or reportlab.
  • Add export buttons to the job detail view in the frontend.

Acceptance criteria

  • Clicking "Export CSV" downloads a well-formed CSV of the analysis results.
  • Clicking "Export PDF" downloads a formatted PDF report.
  • The backend returns 404 for unknown job IDs and 400 for unsupported format values.
## Context Roadmap item: P3 -- Export analysis reports Users currently cannot download analysis results. Adding export functionality would make SPARC more useful for sharing findings outside the dashboard. ## What to do - Add a backend endpoint (e.g., `GET /analyze/{job_id}/export?format=pdf|csv`) that serialises the analysis result. - For CSV: use Python's `csv` module or pandas. - For PDF: use a library such as `weasyprint` or `reportlab`. - Add export buttons to the job detail view in the frontend. ## Acceptance criteria - [ ] Clicking "Export CSV" downloads a well-formed CSV of the analysis results. - [ ] Clicking "Export PDF" downloads a formatted PDF report. - [ ] The backend returns 404 for unknown job IDs and 400 for unsupported format values.
AI-Manager added the P3agent-readylargefeature labels 2026-03-30 18:24:06 +00:00
Author
Owner

Triage: Already resolved in main.

Both PDF and CSV export endpoints exist in SPARC/api.py:

  • GET /export/{company_name}/csv (around line 600) using Python csv module
  • GET /export/{company_name}/pdf (lines 638-793) using reportlab with formatted title, summary table, and individual analysis sections

Both are auth-protected and return proper Content-Disposition headers for download. Closing as complete.

**Triage: Already resolved in main.** Both PDF and CSV export endpoints exist in `SPARC/api.py`: - `GET /export/{company_name}/csv` (around line 600) using Python csv module - `GET /export/{company_name}/pdf` (lines 638-793) using reportlab with formatted title, summary table, and individual analysis sections Both are auth-protected and return proper Content-Disposition headers for download. Closing as complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1416