Supported Export Formats
Quail supports four export formats, each optimized for different use cases:CSV
Comma-separated values for universal compatibility and data portability
Excel
XLSX format for advanced spreadsheet analysis and formatting
Professional reports with formatted tables (uses jsPDF)
SQL
Export your SQL queries as .sql files for versioning and sharing
Exporting Query Results
After executing a query, you can export the results using the download button in the results panel.Open Export Menu
Click the Download button (download icon) in the results toolbar, or use the keyboard shortcut
Ctrl+S (Windows/Linux) or Cmd+S (Mac).Select Format
Choose your desired export format from the dropdown menu:
- Download CSV
- Download Excel
- Download PDF
Selective Data Export
Quail allows you to export either all results or only selected rows.Exporting Selected Rows
Select Rows
Use the checkboxes in the first column of the results table to select specific rows you want to export.
Exporting All Data
If no rows are selected, the export automatically includes all query results.The export respects column visibility settings. Hidden columns will not be included in the exported file.
Export Format Details
CSV Export
CSV (Comma-Separated Values) is ideal for data portability and importing into other systems. Features:- Universal format compatible with all spreadsheet applications
- Handles special characters and commas in data values
- Properly escapes quotes in text fields
- UTF-8 encoding for international character support
- Importing data into other databases
- Data processing with scripts
- Lightweight data transfer
- Version control-friendly format
Excel Export
Excel export creates.xlsx files using the xlsx library (SheetJS).
Features:
- Native Excel format (XLSX)
- Preserves data types
- Single worksheet named “Data” or “Selected Data”
- Compatible with Microsoft Excel, Google Sheets, and LibreOffice
- Business reports requiring formatting
- Data analysis with Excel features
- Sharing with non-technical users
- Creating pivot tables and charts
PDF Export
PDF export generates professional reports usingjspdf and jspdf-autotable.
Features:
- Professional tabular layout
- Automatic table pagination for large datasets
- Dark gray header (RGB: 66, 66, 66)
- Compact 8pt font for maximum data density
- 20pt top margin for branding
- Executive reports
- Print-ready documents
- Archival purposes
- Email attachments for stakeholders
PDF exports are optimized for printing with automatic page breaks and consistent formatting.
SQL Export
Export your SQL queries as reusable.sql files.
Features:
- Saves the query text from the editor
- Timestamp-based default filenames (
query-2026-03-10T14-30-00.sql) - Plain text format for version control
- Preserves formatting and comments
- Query versioning and backup
- Sharing queries with team members
- Building query libraries
- Documentation purposes
Column Visibility Control
Control which columns appear in your exports:Toggle Column Visibility
Use the column visibility controls in the results table to show/hide specific columns.
Handling Special Data
NULL Values
NULL values are handled consistently across formats:- CSV: Empty string
"" - Excel: Empty cell
- PDF: Empty string
Special Characters
Data containing special characters is properly escaped:Large Text Fields
Long text values are preserved in all formats, though PDF may truncate very wide content to fit page width.Date and Time
Dates are exported in their string representation. Format dates in your SQL query for consistent output:File Naming Conventions
Default Names
| Export Type | Default Filename |
|---|---|
| All rows | query_results.[format] |
| Selected rows | selected_data.[format] |
| SQL query | query-[timestamp].sql |
Custom Names
Provide custom filenames programmatically:Custom filenames automatically receive the appropriate file extension (.csv, .xlsx, .pdf, .sql).
Performance Considerations
Large Datasets
Exporting large result sets:- CSV: Most efficient for large datasets (direct string concatenation)
- Excel: Moderate memory usage (uses XLSX library)
- PDF: Highest memory usage (rendering and pagination)
Browser Limitations
Browser memory limits may affect very large exports:- Most browsers handle up to 1 million rows in CSV format
- Excel exports are limited by the XLSX library (approximately 1 million rows)
- PDF exports should be limited to printable sizes (under 10,000 rows)
Best Practices
- Filter data: Export only necessary rows using WHERE clauses
- Select columns: Include only required columns in your query
- Paginate: For huge datasets, export in batches
- Use CSV: Choose CSV for maximum performance with large data
Common Use Cases
Business Reporting
Data Migration
Sharing Queries
Ad-hoc Analysis
Troubleshooting
Export Button Disabled
Cause: Export is in progress or no data available Solution:- Wait for current export to complete
- Execute a query to generate results
- Verify the query returned data
Empty File Downloaded
Cause: No rows selected and table is empty Solution:- Verify your query returned results
- Check if all columns are hidden
- Ensure at least one row is visible
Special Characters Corrupted
Cause: Encoding issue with international characters Solution:- CSV files use UTF-8 encoding by default
- Open CSV files with UTF-8 encoding in your spreadsheet app
- For Excel, the XLSX format handles Unicode natively
PDF Tables Truncated
Cause: Too many columns for page width Solution:- Hide unnecessary columns before export
- Use landscape orientation (future feature)
- Export as CSV/Excel for wide tables
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+S / Cmd+S | Open export menu |
Esc | Close export menu |
API Integration
Developers can integrate export functionality programmatically:Next Steps
SQL Editor
Learn how to write and execute SQL queries
Schema Explorer
Explore your database structure before exporting
Charts
Create visual representations of your data
Dashboards
Build interactive dashboards with your data
