How to Convert Local Spreadsheet Range Data to an Image File: Step‑by‑Step Guide

Export data of a range from a local Excel file to an Image file using the Cloud API.

Supported IMAGE FORMATS:

Convert Range to Image API

Web API

PUT http://api.aspose.cloud/v4.0/cells/convert/range/image

Request Parameters:

Parameter Name Type Path/Query String/HTTPBody Description
Spreadsheet File FormData Upload the spreadsheet file for conversion.
worksheet String Query The worksheet name of the spreadsheet.
range String Query Define the cell area to convert (e.g., A1:C10).
format String Query Specify the output file format (e.g., png, svg, tiff).
printHeadings Boolean Query Indicate if row and column headings should be printed.
outPath String Query (Optional) The folder path where the workbook is stored; default is null.
outStorageName String Query Name of the output file storage.
fontsLocation String Query Custom fonts to use for the conversion.
region String Query Define the spreadsheet region setting.
password String Query Password for opening the spreadsheet file if it is protected.

Response

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

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 is not accessible.
  • 500 Server Error: The spreadsheet encountered an anomaly while obtaining calculation data.

Where Should You Use the Convert Range to Image API?

  • Static Report Snapshots: Convert financial data ranges, tables, or calculations into images for inclusion in PDF reports, PowerPoint slides, or printed documents where editing is not required.
  • Data Visualization in Presentations: Turn complex spreadsheet ranges containing formatted tables, conditional formatting, or simple data visualizations into images to embed in presentations (PPTX, Google Slides).
  • Documentation & Training Materials: Capture spreadsheet examples, templates, or data‑entry forms as images for user manuals, tutorials, or knowledge‑base articles.
  • Thumbnail Previews: Create small image previews of key spreadsheet sections for file browsers, document libraries, or search results.

Why Should You Use the Convert Range to Image API?

  • Developer‑Friendly: Aspose.Cells Cloud offers SDK libraries in multiple languages, enabling quick development and comes with comprehensive documentation. Compared with building custom chart‑rendering solutions, this significantly reduces development workload.
  • Cost‑Effective: You can convert range data without first uploading the entire workbook, which saves storage space and reduces costs.
  • Pixel‑Perfect Preservation: Faithfully replicates Excel’s appearance—including cell formatting, formulas (as displayed values), borders, colors, and conditional formatting—in the output image.
  • Universal Compatibility: Image formats (PNG, JPEG, TIFF, BMP, SVG, and others) are viewable on any device or platform without specialized software, ensuring maximum accessibility.

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

Convert Range to Image API Specification

The Convert Range to Image API Specification provides a publicly accessible programming interface, enabling REST interactions directly from your web browser.

Use Aspose.Cells Cloud SDKs

Using the SDK is the fastest way to develop, as it abstracts away low‑level details, allowing you to convert range data to an image with minimal code.
Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.

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