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

# Get Excel Preview

> Download a OneDrive Excel/CSV file and return its column names plus
the first ``limit`` rows.

Used by the frontend chart wizard to render a tabular preview *before*
a chart is created. Graph credentials follow the same pattern as the
other routes in this router: resolve the user's OneDrive
``Integration`` row, acquire a short-lived bearer header under
:func:`env_scope`, then call
:func:`shared_download_and_parse` off the event loop.



## OpenAPI

````yaml /api-reference/openapi.json get /api/onedrivebrowser/excel-preview
openapi: 3.1.0
info:
  title: apowerb API
  description: REST API of the apowerb agentic framework (open-source edition).
  version: 0.1.2
  license:
    name: MIT
    url: https://github.com/apowerb/apowerb/blob/main/LICENSE
servers:
  - url: https://api.example.com
    description: Your apowerb instance
  - url: http://localhost:8000
    description: Local stack
security: []
paths:
  /api/onedrivebrowser/excel-preview:
    get:
      tags:
        - onedrive-browser
      summary: Get Excel Preview
      description: |-
        Download a OneDrive Excel/CSV file and return its column names plus
        the first ``limit`` rows.

        Used by the frontend chart wizard to render a tabular preview *before*
        a chart is created. Graph credentials follow the same pattern as the
        other routes in this router: resolve the user's OneDrive
        ``Integration`` row, acquire a short-lived bearer header under
        :func:`env_scope`, then call
        :func:`shared_download_and_parse` off the event loop.
      operationId: get_excel_preview_api_onedrivebrowser_excel_preview_get
      parameters:
        - name: item_path
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            title: Item Path
        - name: sheet_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Sheet Name
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 50
            minimum: 1
            default: 5
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

## Related topics

- [Preview a dataset](/api-reference/bi-datasets/preview-a-dataset.md)
- [Preview a OneDrive spreadsheet (xlsx/xls/xlsm/ods/csv/tsv)](/api-reference/bi-datasets/preview-a-onedrive-spreadsheet-xlsxxlsxlsmodscsvtsv.md)
- [Get Webhook Log Attachment](/api-reference/webhooks/get-webhook-log-attachment.md)
- [Get a single chart](/api-reference/charts/get-a-single-chart.md)
- [Create a chart](/api-reference/charts/create-a-chart.md)
