Skip to content
Utilerio
All endpoints

Excel / CSV to SQL INSERT

POST/api/v1/tools/spreadsheet-to-sql

Turn an Excel sheet or CSV into batched SQL INSERT statements for Postgres, MySQL or SQL Server.

Authentication

Requires an API key in the X-API-Key header.

Try it

POST/api/v1/tools/spreadsheet-to-sql

Parameters

rowsstringrequired

Rows as an array of objects.

tableNamestringoptional

Target table name. Default my_table.

dialectstringoptional

SQL dialect. Default postgres.

postgresmysqlsqlserver
batchSizeintegeroptional

Rows per INSERT statement. Default 500.

Request body

{
  "rows": [
    {
      "id": 1,
      "name": "Ada"
    },
    {
      "id": 2,
      "name": "Alan"
    }
  ],
  "tableName": "users",
  "dialect": "postgres",
  "batchSize": 500
}

Response codes

  • 200Success.
  • 400Invalid request — check your body or parameters.
  • 401Missing or invalid API key.
  • 403The API key is not scoped to this endpoint.
  • 429Rate limit exceeded — retry after a short wait.

Language

cURL

Request

curl -X POST https://utilerio.com/api/v1/tools/spreadsheet-to-sql \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rows":[{"id":1,"name":"Ada"},{"id":2,"name":"Alan"}],"tableName":"users","dialect":"postgres","batchSize":500}'

Response

{ "sql": "INSERT INTO \"users\" (\"id\", \"name\") VALUES\n(1, 'Ada'),\n(2, 'Alan');", "rowCount": 2 }