Skip to content
Get started

Create structured sheets

client.structuredSheets.create(StructuredSheetCreateParams { file_id, sheet_names } body, RequestOptionsoptions?): StructuredSheetResponse { id, created_at, file_id, 6 more }
POST/v1/structured-sheets

Start converting a spreadsheet workbook into structured data. This initiates an asynchronous conversion process. Poll the returned resource using the id to check completion status.

ParametersExpand Collapse
body: StructuredSheetCreateParams { file_id, sheet_names }
file_id: string

The unique identifier of the file to convert.

sheet_names?: Array<string> | null

List of sheet names to convert. If None, all sheets will be converted.

ReturnsExpand Collapse
StructuredSheetResponse { id, created_at, file_id, 6 more }

Response representing a structured sheets conversion job.

This is returned from POST (create), GET (retrieve), and list endpoints.

id: string

The unique identifier for this structured sheets conversion.

created_at: string

The timestamp when the conversion was started.

formatdate-time
file_id: string

The unique identifier for the source file.

status: "pending" | "queued" | "in_progress" | 3 more

The current processing status.

Accepts one of the following:
"pending"
"queued"
"in_progress"
"completed"
"failed"
"cancelled"
updated_at: string

The timestamp when the conversion was last updated.

formatdate-time
exports_available?: Array<string>

List of export formats available for download (e.g., ['sqlite']).

last_error?: LastError | null

Error information when processing fails.

code: string

A machine-readable error code.

maxLength64
message: string

A human-readable description of the error.

maxLength1024
object?: "structured_sheet"

The object type, which is always 'structured_sheet'.

sheet_names?: Array<string>

List of sheet names included in this conversion.

Create structured sheets
import DeepTable from '@deeptable/deeptable';

const client = new DeepTable({
  apiKey: process.env['DEEPTABLE_API_KEY'], // This is the default and can be omitted
});

const structuredSheetResponse = await client.structuredSheets.create({
  file_id: 'file_01h45ytscbebyvny4gc8cr8ma2',
});

console.log(structuredSheetResponse.id);
{
  "id": "ss_01abc2def3ghjkmnpqrs4uvwxy",
  "created_at": "2024-01-15T10:30:00Z",
  "file_id": "file_01abc2def3ghjkmnpqrs4uvwxy",
  "status": "completed",
  "updated_at": "2024-01-15T10:35:00Z",
  "exports_available": [
    "sqlite"
  ],
  "last_error": {
    "code": "invalid_file_format",
    "message": "The uploaded file is not a valid Excel spreadsheet."
  },
  "object": "structured_sheet",
  "sheet_names": [
    "Sheet1",
    "Financials"
  ]
}
Returns Examples
{
  "id": "ss_01abc2def3ghjkmnpqrs4uvwxy",
  "created_at": "2024-01-15T10:30:00Z",
  "file_id": "file_01abc2def3ghjkmnpqrs4uvwxy",
  "status": "completed",
  "updated_at": "2024-01-15T10:35:00Z",
  "exports_available": [
    "sqlite"
  ],
  "last_error": {
    "code": "invalid_file_format",
    "message": "The uploaded file is not a valid Excel spreadsheet."
  },
  "object": "structured_sheet",
  "sheet_names": [
    "Sheet1",
    "Financials"
  ]
}