Skip to content

Tables as Spreadsheet Options

Tables as spreadsheet options allow you to configure how tables are exported as spreadsheet files during parsing.

When enabled, this feature extracts tables from documents and exports them as spreadsheet files (Excel format), making it easier to work with tabular data in spreadsheet applications.

Enable or disable the tables as spreadsheet export feature.

{
"output_options": {
"tables_as_spreadsheet": {
"enable": true
}
}
}

Sheet names are automatically guessed based on table content and context. This feature is always enabled in v2.

  • Data Analysis: Export tables for further analysis in Excel or other spreadsheet tools
  • Data Migration: Extract tabular data from PDFs for database imports
  • Financial Reports: Convert financial tables to spreadsheet format for calculations
  • Research Data: Extract datasets from academic papers or reports
Terminal window
curl -X 'POST' \
'https://api.cloud.llamaindex.ai/api/v2/parse' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \
--data '{
"file_id": "<file_id>",
"tier": "agentic_plus",
"version": "latest",
"output_options": {
"tables_as_spreadsheet": {
"enable": true
}
}
}'

After parsing completes, retrieve the XLSX file using the xlsx_content_metadata expand parameter. This returns a presigned URL for direct download:

Terminal window
curl -X 'GET' \
'https://api.cloud.llamaindex.ai/api/v2/parse/{job_id}?expand=xlsx_content_metadata' \
-H 'Accept: application/json' \
-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"

The response includes metadata with a presigned URL:

{
"job": { ... },
"result_content_metadata": {
"xlsx": {
"size_bytes": 15234,
"exists": true,
"presigned_url": "https://s3.amazonaws.com/..."
}
}
}

Use the presigned_url to download the XLSX file directly. The URL is temporary and valid for a limited time.