PDF to Excel
Extract tables from PDF documents to Excel (.xlsx) or CSV format.
https://api.morphopdf.com/v1/convert/pdf-to-excelAuthentication
Retrieve your API Key from Dashboard.
Request Body
Provide the PDF file using one of the following methods.
fileFilePDF file uploaded via multipart/form-data.
urlstringOptionalPublic URL pointing to a PDF file.
Query Parameters
formatstringOptionalDefault: jsonResponse format. Use 'binary' to receive the Excel file directly, or 'json' for metadata.
outputFormatstringOptionalDefault: xlsxOutput file format. Options: 'xlsx' (Excel) or 'csv' (comma-separated values).
modestringOptionalDefault: convertOperation mode. 'detect' returns table regions without converting, 'convert' performs full conversion.
Response
When using format=json (default):
successbooleanIndicates whether the operation completed successfully.
messagestringHuman-readable status message.
fileNamestringName of the generated Excel file.
downloadUrlstringPresigned URL to download the file. Valid for 1 hour.
Table Detection
For best results, use PDFs with clearly defined tables. Scanned documents may require OCR preprocessing. Tables with visible borders are detected more reliably.
Error Responses
| Status | Code | Description |
|---|---|---|
| 400 | INVALID_INPUT | No file provided or invalid PDF |
| 400 | INVALID_FILE_TYPE | File is not a valid PDF document |
| 401 | AUTHENTICATION_REQUIRED | Missing or invalid API key |
| 500 | PROCESSING_FAILED | No tables detected or processing error |
/v1/convert/pdf-to-excelcurl -X POST "https://api.morphopdf.com/v1/convert/pdf-to-excel?format=binary" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf" \
--output spreadsheet.xlsx{
"success": true,
"message": "File processed successfully",
"fileName": "spreadsheet.xlsx",
"downloadUrl": "https://files.morphopdf.com/sessions/abc123/output/spreadsheet.xlsx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&..."
}