How to Convert Local Spreadsheet Range Data to a JSON File: Step-by-Step Guide

Export range data from a local Excel file to a JSON file using the Cloud API.

Convert Range to JSON API

Web API

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

Security and Authentication

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

-H "Authorization: Bearer {access_token}"

Request Parameters:

Parameter Name Type Path/Query String/HTTP Body Description
Spreadsheet File FormData Upload the spreadsheet file.
worksheet String Query Name of the worksheet in the spreadsheet.
range String Query Cell area to convert, e.g., A1:C10.
outPath String Query (Optional) Folder path where the workbook is stored; default is null.
outStorageName String Query Name of the output file storage.
fontsLocation String Query Location for storing custom fonts for home use.
region String Query The spreadsheet region setting.
password String Query Password for opening the spreadsheet file.

Response

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

Error Codes

  • 200 OK – Returns the converted JSON file stream.
  • 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 is not accessible.
  • 500 Server Error: The spreadsheet has encountered an anomaly in obtaining calculation data.

Where Should You Use the Convert Range to JSON API?

  • Real-time Dashboards: Convert live Excel data to JSON for real‑time charting libraries (Chart.js, D3.js).
  • Spreadsheet-as-Service: Excel ranges as JSON endpoints for other microservices to consume.
  • Webhook Payloads: Convert spreadsheet data to JSON for webhook notifications.
  • Rapid Data Prototyping: Quick conversion of cleaned Excel data to JSON for Python/R analysis.
  • Machine Learning Pipelines: Pre‑process training data from business‑maintained spreadsheets.
  • E-commerce Operations: Transform product catalogs or pricing sheets to JSON for website sync.
  • Reporting Automation: Generate JSON data feeds from financial models for automated reporting.
  • App Configuration: Manage feature flags, settings, or A/B test parameters in Excel → JSON.
  • Multi-language Support: Convert localization spreadsheets to JSON for i18n libraries.
  • Dynamic Menus/Navigation: Manage website navigation structures in Excel, deploy as JSON.

For other conversion options, see the Convert Range to CSV guide.

Why should you use the Convert Range to JSON API?

  • Developer‑Friendly: Aspose.Cells Cloud provides SDK libraries for multiple languages, enabling quick development with comprehensive documentation. This reduces the amount of custom code required compared with building a conversion solution from scratch.
  • Cost‑Effective: You can convert range data without first uploading the workbook, which saves storage space and reduces costs.
  • Modern Web & Mobile Applications: JSON is the native data format for web applications. Converting Excel ranges to JSON allows JavaScript frameworks such as React, Vue, or Angular to consume the data directly.
  • Broad Compatibility: JSON is supported by virtually every programming language, database, and web service, ensuring the converted data can be used anywhere.
  • Structured Data Preservation
    • Intelligent Structure Detection: Automatically converts tabular data to proper JSON arrays/objects.
    • Header Mapping: Uses the first row as JSON keys for clean object structures.
    • Data Type Retention: Preserves number, date, and boolean types (not just text).

How to Use the Convert Range to JSON API with SDKs?

Convert Range to JSON API Specification

The Convert Range to JSON API Specification defines a publicly accessible programming interface and allows you to carry out REST interactions directly from a web browser.

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 convert a range of data to a JSON file with concise code.
Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.

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