Convert a Spreadsheet Chart to an Image

Convert a chart from a local spreadsheet/Excel file to an image format file. Supported IMAGE FORMATS: PNG, SVG, TIFF, JPEG, BMP

Convert Chart to Image API

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

Request Parameters:

Parameter Name Type Path/Query String/HTTPBody Description
Spreadsheet File FormData Upload the spreadsheet file containing the chart.
worksheet String Query Specify the worksheet name if applicable.
chartIndex Integer Query Index of the chart to convert.
format String Query (Required) The desired image type (e.g., svg, png, jpg).
outPath String Query (Optional) The folder path where the workbook is stored; defaults to null.
outStorageName String Query Name of the storage for the output file.
fontsLocation String Query Specify custom fonts if needed.
region String Query Set the spreadsheet region.
password String Query The password for opening the spreadsheet file.

Response

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

Error Codes

  • 400 Bad Request: Invalid Apose.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 you use the Convert Chart to Image API?

  • Export the charts in the spreadsheet as images.

Why should you use the Convert Chart to Image API?

  • No need for cloud storage, reducing the burden on cloud resources.
  • Development can be quickly completed through the existing SDK.

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

Convert Chart to Image API Specification

The Convert Chart to Image API Specification defines a publicly accessible programming interface and enables 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 chart to an image 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 make calls to Aspose.Cells web services using various SDKs: