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

The ConvertWorksheetToJson endpoint reads a spreadsheet file from the local file system, extracts the specified worksheet, and returns its content as a JSON file. The conversion is performed entirely on Aspose.Cells Cloud servers, so no intermediate upload or storage is required. It supports password‑protected workbooks, custom font locations, and regional settings, delivering a fast, cloud‑native solution for exporting worksheet data to JSON for downstream processing.

Convert Worksheet To JSON API

Web API

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

Security and Authentication

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

Request Parameters:

Parameter Name Type Location Required/Optional Description
Spreadsheet file FormData Required The Excel workbook to be processed. Must be a supported format (xls, xlsx, csv, etc.). Sent as multipart/form-data. Example: Spreadsheet=@C:\Docs\Sample.xlsx.
worksheet string Query Required Exact name of the worksheet to convert (case‑sensitive). If omitted or not found, the API returns an error. Example: worksheet=Sheet1.
outPath string Query Optional Destination folder on the configured cloud storage where the generated JSON file will be saved. If not provided, the JSON is returned directly in the response stream. Example: outPath=/converted/.
outStorageName string Query Optional Name of the target storage (e.g., “MyStorage”) that contains the outPath. Uses the default storage when omitted.
fontsLocation string Query Optional Server‑side folder that holds custom fonts required for accurate rendering of text in the worksheet. Example: fontsLocation=/fonts/custom/.
region string Query Optional Culture/region identifier that influences number, date, and currency formatting in the generated JSON (e.g., en-US, fr-FR).
password string Query Optional Password to open an encrypted workbook. If the workbook is not password‑protected, omit this parameter.

Response

[
  {
    "Name": "ResponseFile",
    "DataType": {
      "Identifier": "File",
      "Reference": "Stream"
    }
  }
]

HTTP Status Codes

Code Meaning Description
200 OK Filter applied successfully; response contains operation 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.

Where should we use the Convert Worksheet to JSON API?

  • Web dashboards – Export worksheet data to JSON for client‑side charting libraries (e.g., Chart.js, D3.js).
  • Data migration – Move legacy Excel data into NoSQL databases or REST services that consume JSON.
  • Mobile or offline apps – Convert worksheet content to JSON on the server, then sync the lightweight payload to mobile devices.
  • Reporting pipelines – Feed worksheet data directly into analytics engines that accept JSON input without intermediate CSV steps.

Why should you use the Convert Worksheet to JSON API?

  • Zero‑upload workflow – Process local files in the cloud without first uploading them to storage, saving bandwidth and storage costs.
  • Full‑featured conversion – Supports password‑protected workbooks, custom fonts, and regional formatting for accurate data representation.
  • Fast, scalable execution – Leverages Aspose.Cells’ high‑performance engine on cloud infrastructure, handling large worksheets efficiently.
  • Simplified integration – Single PUT call returns a ready‑to‑use JSON file or stores it directly, reducing code complexity in client applications.

How to Use the Convert Worksheet to JSON API with SDKs

Convert Worksheet to JSON API Specification

The Convert Worksheet to JSON API Specification provides a publicly accessible programming interface for executing 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 the SDK is the fastest way to develop, as it abstracts away low‑level details and lets you work with spreadsheets using concise 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: