> ## Documentation Index
> Fetch the complete documentation index at: https://docs.raydocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Export Result to Excel

> Download extraction result as an Excel file with full audit trail.

## Authentication & Scope

Requires the `sessions-read` ability.

## Request

```http theme={null}
GET /extractions/results/990e8400-e29b-41d4-a716-446655440000/export/excel HTTP/1.1
Host: api.raydocs.com
Authorization: Bearer <token>
```

### Path Parameters

| Parameter  | Type | Required | Description   |
| ---------- | ---- | -------- | ------------- |
| `resultId` | uuid | Yes      | The result ID |

## Response

`200 OK` – Excel file download.

```http theme={null}
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Content-Disposition: attachment; filename="extraction_result.xlsx"
```

### Excel Structure

The exported Excel file contains multiple sheets:

| Sheet        | Contents                                              |
| ------------ | ----------------------------------------------------- |
| **Data**     | Clean extracted values in tabular format              |
| **Audit**    | Reasoning and source references for each field        |
| **Metadata** | Extraction timestamp, template info, document details |

<Tip>
  The audit sheet is useful for compliance reviews and data validation workflows.
</Tip>

`404 Not Found` – Result does not exist or you don't have access.


## OpenAPI

````yaml get /extractions/results/{resultId}/export/excel
openapi: 3.0.1
info:
  title: Raydocs API
  description: REST API for document extraction with AI-powered data parsing
  version: 1.0.0
servers:
  - url: https://api.raydocs.com
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Create and manage workspaces.
  - name: Workspace Users
    description: Manage users within a workspace.
  - name: Extraction Templates
    description: Define extraction schemas and settings.
  - name: Extraction Sessions
    description: Manage extraction jobs and documents.
  - name: Batch Operations
    description: Bulk operations on sessions.
  - name: Documents
    description: Upload and manage source documents.
  - name: Workflows
    description: Discover workflow runs and read their public outputs.
  - name: Results
    description: Access extraction results.
paths:
  /extractions/results/{resultId}/export/excel:
    get:
      tags:
        - Results
      summary: Export to Excel
      description: Export extraction result as Excel file. Requires `sessions-read`.
      operationId: exportResultExcel
      parameters:
        - name: resultId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Excel file
          content:
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                type: string
                format: binary
        '404':
          description: Not Found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Personal Access Token created from the Raydocs dashboard.

        Include in the Authorization header: `Bearer <your_token>`

        See [API Keys](/api-reference/api-keys) for token creation and
        management.

````