Export Shapes – Aspose.Cells Cloud

Exporting shapes from Excel enables reuse of diagrammatic content across platforms and applications. Prerequisites: a valid JWT access token and the source Excel file to upload.

You can export shapes to the following formats: PNG, GIF, JPEG, BMP, SVG, TIFF, EMF, WMF.

PostExport API

PUT https://api.aspose.cloud/v3.0/cells/export

Security and Authentication

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

Request Parameters

Parameter Name Type Path/Query String/HTTP Body required Description
file file formData True File to upload
objectType string query True The type of object to export. For chart export use chart. Valid values include shape, worksheet, picture, etc.
format string query True Desired output format. Supported values: png, jpeg, gif, bmp, svg, tiff, emf, wmf, pdf.

Request Example

curl -X PUT "https://api.aspose.cloud/v3.0/cells/export?objectType=shape&format=tiff" \
     -H "accept: multipart/form-data" \
     -H "Content-Type: multipart/form-data" \
     -H "Authorization: Bearer <your_access_token>" \
     -H "x-aspose-client: Containerize.Swagger" \
     -d '{"File":{}}'

Response

{
  "Files": [
    {
      "Filename": "Book1_xlsx_Sheet1_Shapes_0.tif",
      "FileSize": 390,
      "FileContent": "-----Base64String--------"
    }
    // ... additional file objects ...
  ]
}

Typical Base64‑encoded file payloads range from a few hundred bytes to several megabytes, depending on image dimensions and format.

HTTP Status Codes

Code Meaning Description
200 OK Shapes exported successfully; response contains the file list.
400 Bad Request Missing or invalid parameters.
401 Unauthorized Invalid or missing access token.
413 Payload Too Large Uploaded file exceeds size limit.
500 Internal Server Error Unexpected server error.

How to Use the PostExport API with SDKs

PostExport API Specification

The OpenAPI Specification defines a publicly accessible programming interface and lets you perform 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 call the Cloud API using cURL.

curl -X PUT "https://api.aspose.cloud/v3.0/cells/export?objectType=shape&format=tiff" \
     -H "accept: multipart/form-data" \
     -H "Content-Type: multipart/form-data" \
     -H "Authorization: Bearer <your_access_token>" \
     -H "x-aspose-client: Containerize.Swagger" \
     -d '{"File":{}}'

Use Aspose.Cells Cloud SDKs

Using an SDK is the fastest way to develop against Aspose.Cells Cloud. An SDK abstracts low‑level details, letting you focus on business logic. See the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.

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