Exporting Reports
Download analytics reports as CSV, Excel, or PDF
Every report you build or open in OptiLearn can be downloaded as a file. The Export button lives on the report viewer at /analytics/reports/[id] and supports three formats out of the box.
How to export
- Open any saved report.
- Click the Export dropdown in the top-right of the viewer.
- Choose CSV, Excel (XLSX), or PDF.
- The file downloads to your browser's default location with a name like
Weekly_enrollment_digest_2026-04-13.xlsx.
The export uses the same data you see on screen. If your role only sees your own courses, the exported file will contain only your courses. Sharing a saved report with another user does not let them export data they couldn't otherwise see — exports run through the same scope guard as the live view.
Format reference
CSV
- UTF-8 with BOM (Excel-friendly on Windows)
- CRLF line endings, RFC 4180 quoting
- Numbers stay numeric — no thousands separators that would confuse parsers
- Best for: piping into another tool, spreadsheets, scripts
Excel (XLSX)
- Single sheet named after the report
- Frozen header row
- Auto-sized columns (capped at 60 chars to keep the file sane)
- Numeric-looking cells written as numbers, not strings — formulas and SUM() work immediately
- Best for: analysts, ad-hoc pivoting, sharing with non-technical staff
- Landscape A4
- Title block with report name, description, and generation timestamp
- Striped table with page numbers in the footer
- Table-only in v1 — chart rendering lands in v1.1
- Best for: emailing summaries, printing, archiving
What the file contains
For rows-mode reports (no grouping or aggregation), the file has one column per field you selected, in the order you selected them, plus the row id.
For buckets-mode reports (grouped or aggregated), the first column is the group key (e.g. 2026-04-13 for a daily time grouping, or PUBLISHED for a status grouping), and the remaining columns are the aggregation series.
Either way, the file mirrors what you see in the viewer's table view. If your report renders as a chart, the export still produces a tabular projection of the same data.
Row limits
Exports cap at 10,000 rows in v1 — the same hard limit the executor enforces for live runs. If your report would return more rows, the file is truncated and the metadata header (in PDF) or the last row (in CSV/XLSX) reflects this.
If you regularly need exports beyond 10k rows, file a feature request — the next phase of the engine adds a queued async export path that streams to object storage.
Audit trail
Every export writes a row to LMSAuditLog with:
- The action (
report.export) - The format (
csv,xlsx,pdf) - The row count and file size
- Who exported and when
- Their IP address and user agent
Institution admins will get an audit log viewer in a future release. For now, exports are queryable via direct DB access.
Tips
- Pick CSV for big numbers. A 10k-row CSV is roughly 1MB; the equivalent XLSX is closer to 2MB; a PDF can grow to 4MB. CSV is the fastest both to generate and to download.
- Pick PDF for sharing with non-technical stakeholders. It's the only format that includes the report name, description, and a footer — everything else is "just data."
- Pick XLSX for downstream analysis. Numbers stay numeric, so SUM() works immediately and pivot tables behave.
- Use a Schedule for recurring exports. If you find yourself exporting the same report every Monday, set up a scheduled delivery instead — it will email you the file on cadence.