Skip to content
Guide
Parse
Features

Spreadsheets

How Parse handles Excel, CSV, and other spreadsheet inputs, with one result page per sheet, options for sub-tables, formulas, and hidden sheets, and the DCF template example.

Parse accepts spreadsheet files as input and returns each sheet as one page of the result. A sheet becomes a markdown table that keeps its row and column positions, so a worksheet with a title block, an assumptions block, and two forecast tables stacked vertically comes back as one grid you can read top to bottom. A few input_options.spreadsheet controls change how messy sheets are split up and how formulas are evaluated.

  • Financial models, budgets, and forecasts where the cell values matter and the layout is not a single clean table.
  • Workbooks with several logical tables stacked in one sheet, separated by blank rows.
  • Files that were edited but never recalculated, so cached formula values are stale.
  • Exports and data dumps in csv, tsv, or ods that you want in the same markdown form as everything else.

Supported inputs include xlsx, xls, csv, tsv, numbers, and ods, plus xlsm, xlsb, dif, sylk, dbf, and others listed under Supported document types. The Excel example uses the agentic tier, a strong default for table-heavy documents.

OptionTypeDefaultWhat it does
input_options.spreadsheet.detect_sub_tables_in_sheetsbooleanunsetFind and extract several tables within one sheet instead of merging them. Useful when data regions are separated by blank rows or columns.
input_options.spreadsheet.force_formula_computation_in_sheetsbooleanunsetRecompute formula cells instead of using cached values. Enable for files edited but never recalculated, or templates with placeholder values. Can slow parsing on formula-heavy sheets.
input_options.spreadsheet.include_hidden_sheetsbooleanunsetParse hidden sheets as well as visible ones. By default, hidden sheets are skipped.
output_options.save_output_pdfbooleanunsetA PDF copy of the parsed document; not produced for spreadsheet, plain-text, or audio inputs.

These options apply to spreadsheet inputs and are ignored for other file types. The reverse direction, writing tables found in a PDF out as an XLSX workbook, is output_options.tables_as_spreadsheet; see Tables.

Parse a workbook and print the second sheet:

from llama_cloud import LlamaCloud
client = LlamaCloud() # reads LLAMA_CLOUD_API_KEY from the environment
result = client.parsing.parse(
file_id="FILE_ID", # an .xlsx uploaded with client.files.create(file=..., purpose="parse")
tier="agentic",
version="latest",
input_options={
"spreadsheet": {
"detect_sub_tables_in_sheets": True,
"force_formula_computation_in_sheets": True,
}
},
expand=["markdown"],
)
# One result page per sheet, in workbook order; page_number 2 is the second sheet
second_sheet = next(p for p in result.markdown.pages if p.success and p.page_number == 2)
print(second_sheet.markdown)

The markdown for a sheet is a pipe table whose columns match the sheet’s columns, with empty cells left empty. This excerpt is the second sheet of the DCF template from the Excel example, which stacks an instructions block, an assumptions block, and a forecast table in one sheet:

|Discounted Cash Flow Excel Template||||||||||||
|-|-|-|-|-|-|-|-|-|-|-|-|
|Assumptions||||||||||||
|Tax Rate|20%|||||||||||
|Discount Rate|15%|||||||||||
|||||||||||||
||5 Year Weighted Moving Average|||||||||||
||Year 1|Year 2|Year 3|Year 4|Year 5|Year 6|Year 7|Year 8|Year 9|Year 10|Terminal Value|
|Pre-tax income|50,000.00|55,000.00|45,000.00|52,000.00|60,000.00|||||||
|Net Cash Flow|20,000.00|27,000.00|23,000.00|29,600.00|35,000.00|29,093.33|29,817.78|30,177.48|30,469.23|30,379.74|287,188.00|
|Discounting Factor||||||0.8696|0.7561|0.6575|0.5718|0.4972|0.4972|

Because the whole sheet is one grid, joining the pages into a prompt gives a model enough context to answer questions such as which years’ income taxes equal 20% of pre-tax income. The Excel example finishes with exactly that: a small question-answering step over the parsed markdown.

Note for AI agents: this documentation is built for programmatic access. - Overview of all docs: https://developers.llamaindex.ai/llms.txt - Any page is available as raw Markdown by appending index.md to its URL — e.g. https://developers.llamaindex.ai/llamaparse/parse/getting_started/index.md - Agent-friendly REST search APIs live under https://developers.llamaindex.ai/api/ — search (BM25 full-text), grep (regex), read (fetch a page), and list (browse the doc tree). See https://developers.llamaindex.ai/llms.txt for parameters. - A hosted documentation MCP server is available at https://developers.llamaindex.ai/mcp. If you support MCP, you can ask the user to install it for browsing these docs directly (an alternative to the REST API). Setup: https://developers.llamaindex.ai/for-agents/mcp/ - Other LlamaIndex tooling for agents — the LlamaParse Platform MCP server, agent skills and plugins, and the n8n node — is mapped at https://developers.llamaindex.ai/for-agents/