How to Convert a Local Spreadsheet to JSON Using Aspose.Cells Cloud API

The ConvertSpreadsheetToJson endpoint converts a spreadsheet stored on a local drive into a JSON file entirely on the Aspose.Cells Cloud server. By sending the spreadsheet as multipart/form‑data, the service returns a JSON stream ready for download or further processing. This cloud‑native conversion eliminates the need to upload the file to storage first, reduces storage costs, and simplifies the workflow for applications that require spreadsheet data in JSON format for analytics, reporting, or data exchange.

Convert Spreadsheet To JSON API

API Endpoint

PUT https://api.aspose.cloud/v4.0/cells/convert/spreadsheet/json

Request Parameters:

Parameter Name Type Location Required/Optional Description
Spreadsheet File (multipart/form-data) Required FormData The source spreadsheet file (e.g., .xls, .xlsx, .xlsm). Must be a readable file on the client side. Example: curl -F "Spreadsheet=@myfile.xlsx".
outPath String Optional Query Target folder path where the converted JSON file will be saved on the cloud storage. If omitted, the file is returned directly in the response stream. Example: outPath=/output/.
outStorageName String Optional Query Name of the cloud storage (e.g., Amazon S3, Azure Blob) where the output file should be written. Required only when outPath is used with a non‑default storage.
fontsLocation String Optional Query Path to a custom fonts folder on the server. Use this when the spreadsheet references fonts that are not available in the default library.
region String Optional Query Locale/region identifier (e.g., en-US, fr-FR) that influences number, date, and currency formatting during conversion.
password String Optional Query Password to open a password‑protected spreadsheet. Omit for unprotected files.

Response

Successful response (200 OK)

Content-Type: application/json Content-Disposition: attachment; filename=“converted.json” Content-Length:

Binary stream containing the JSON representation of the workbook

Error Codes

  • 400 Bad Request: Invalid Aspose.Cells Cloud API URI.
  • 401 Unauthorized: Invalid access token. Or invalid client id and secret.
  • 404 Not Found: The spreadsheet file not accessible.
  • 500 Server Error: The spreadsheet has encountered an anomaly in obtaining calculation data.

Where should we use the Convert Spreadsheet To Json API?

  • Data migration pipelines: Convert legacy Excel reports into JSON for ingestion into modern NoSQL databases or data lakes.
  • Mobile or web applications: Quickly transform user‑uploaded spreadsheets into JSON for client‑side rendering without storing the original file in the cloud.
  • Automated reporting: Generate JSON payloads for downstream analytics services (e.g., Power BI, Tableau) directly from spreadsheet inputs.
  • Serverless functions: Use the API within AWS Lambda or Azure Functions to perform on‑the‑fly conversions without managing temporary storage.

Why should you use the Convert Spreadsheet To Json API?

  • Cloud‑native conversion removes the need to upload large files to storage before processing, reducing latency and storage costs.
  • Single‑request workflow: upload the spreadsheet and receive JSON in the same HTTP call, simplifying integration logic.
  • Supports password‑protected and region‑specific spreadsheets, ensuring accurate data representation across locales.
  • Scalable on Aspose’s infrastructure – handles large workbooks and complex formulas without impacting your own server resources.

How to Use the Convert Spreadsheet To Json API with SDKs

Convert Spreadsheet To Json API Specification

The Convert Spreadsheet To Json API Specification provides a publicly accessible programming interface for executing REST interactions directly from a web browser.

Excel API SDK

Use Aspose.Cells Cloud SDKs

Using the SDK is the fastest way to develop, as it abstracts away the low-level details, allowing you to merge a spreadsheet into another spreadsheet with short code. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs. The following code examples demonstrate how to interact with Aspose.Cells web services using various SDKs: