Convert Excel to SQL – Aspose.Cells Cloud API

This REST API converts a spreadsheet file to an SQL format file.

REST API

POST https://api.aspose.cloud/v3.0/cells/convert/sql

Security and Authentication

The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.

Query Parameter

Parameter Name Type Description
password string Password required to open the Excel file.
storageName string Name of the storage where the file is stored.
checkExcelRestriction bool Indicates whether to check Excel file restrictions when modifying cell‑related objects.

Request Body Parameter

Parameter Name Type Description
datafile data file The spreadsheet file to be converted, included as the first part of the request.

Response

The API returns a FileInfo object that contains the generated sql file.

Field Type Description
Filename string Name of the sql file (e.g., example.sql).
FileSize int Size of the file in bytes.
FileContent string Base64‑encoded content of the sql file.

FileInfo

Response Status Codes

Code Meaning Description
200 OK Compression succeeded; response contains compressed file details.
400 Bad Request Missing or invalid parameters (e.g., unsupported file type).
401 Unauthorized Invalid or missing JWT token.
413 Payload Too Large Uploaded file exceeds size limit.
500 Internal Server Error Unexpected server error.

How to Use the PostConvertWorkbookToSQL API with SDKs

PostConvertWorkbookToSQL API Specification

The OpenAPI Specification defines a publicly accessible programming interface and lets you carry out REST interactions directly from a web browser.

You can use the cURL command-line tool to access Aspose.Cells web services easily. The following example shows how to make calls to the Cloud API with cURL.

Use Aspose.Cells Cloud SDKs

Using an SDK is the best way to speed up development. An SDK handles low‑level details, allowing you to focus on your project tasks. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.

The following code examples demonstrate how to call Aspose.Cells web services using various SDKs:

Other APIs Implementing This Function

  • POST /cells/{name}/saveAs – Saves a workbook in a different format and stores the result in the specified storage.

  • PUT /cells/convert – Converts a workbook to another format with optional settings and returns the result in the response.

  • GET /cells/{name} – Retrieves a workbook with optional conversion settings.