Converting a Spreadsheet Chart to a Pdf file

Convert a chart from a local spreadsheet/Excel file to a PDF file.

Convert Chart to Pdf API

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

Request Parameters:

Parameter Name Type Path/Query String/HTTPBody Description
Spreadsheet File FormData Upload the spreadsheet file.
worksheet String Query The name of the worksheet containing the chart.
chartIndex Integer Query The index of the chart to convert.
outPath String Query (Optional) The folder path where the converted file is stored. The default is null.
outStorageName String Query Output file storage name.
fontsLocation String Query Use custom fonts if required.
region String Query The spreadsheet region setting.
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 Pdf API?

  • Export the charts in the spreadsheet as Pdf.

Why should you use the Convert Chart to Pdf 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 Pdf API with SDKs?

Convert Chart to Pdf API Specification

The Convert Chart to Pdf API Specification defines a publicly accessible programming interface and lets you 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 a pdf file with short code. The following code examples demonstrate how to make calls to Aspose.Cells web services using various SDKs: