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

# Preview the tables a spreadsheet would create

> Parses a CSV, TSV, or XLSX file and reports, per sheet, the column headers, the type inferred for each column, and the first few rows — without creating anything.

Pass the result's types back to `POST /table/csv-upload` as `columnTypes` to import with any of them changed.



## OpenAPI

````yaml post /table/csv-preview
openapi: 3.1.0
info:
  title: HERO API
  version: current
  description: |-
    The HERO REST API.

    See https://developers.myhero.so for the rendered docs.
servers:
  - url: https://app.myhero.so
security: []
paths:
  /table/csv-preview:
    post:
      tags:
        - Tables
      summary: Preview the tables a spreadsheet would create
      description: >-
        Parses a CSV, TSV, or XLSX file and reports, per sheet, the column
        headers, the type inferred for each column, and the first few rows —
        without creating anything.


        Pass the result's types back to `POST /table/csv-upload` as
        `columnTypes` to import with any of them changed.
      operationId: previewTableFromCSV
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                projectId:
                  type: string
                  minLength: 1
                csvData:
                  type: string
                  minLength: 1
                format:
                  type: string
                  enum:
                    - csv
                    - tsv
                    - xlsx
                columnTypes:
                  type: object
                  additionalProperties:
                    type: object
                    additionalProperties:
                      type: string
                      enum:
                        - string
                        - number
                        - money
                        - date
                        - checkbox
                        - select
                        - multiSelect
                        - email
                        - url
                        - phone
                        - progress
                        - person
              required:
                - projectId
                - csvData
      responses:
        '200':
          description: 200 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      sheets:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                            rowCount:
                              type: number
                            columns:
                              type: array
                              items:
                                type: object
                                properties:
                                  index:
                                    type: number
                                  name:
                                    type: string
                                  type:
                                    type: string
                                  isIdentifier:
                                    type: boolean
                                    example: false
                                  overridden:
                                    type: boolean
                                  selectOptions:
                                    type: array
                                    items:
                                      type: string
                                  samples:
                                    type: array
                                    items:
                                      type: string
                                  unmatchedValues:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - index
                                  - name
                                  - type
                                  - isIdentifier
                                  - overridden
                                  - samples
                          required:
                            - name
                            - rowCount
                            - columns
                    required:
                      - sheets
                required:
                  - data
        '400':
          description: 400 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: |-
                      Error class name (e.g.

                      ValidationError, NotFound)
                  message:
                    type: string
                    description: Human-readable error message
                  details:
                    type: array
                    items: {}
                required:
                  - error
                  - message
        '403':
          description: 403 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: |-
                      Error class name (e.g.

                      ValidationError, NotFound)
                  message:
                    type: string
                    description: Human-readable error message
                  details:
                    type: array
                    items: {}
                required:
                  - error
                  - message
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: HERO personal access token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.