---
title: "Converts a chart of spreadsheet on a local drive to image."
description: "This method reads a chart of spreadsheet file from the local file system, converts it into the desired image format (e.g., PNG, SVG, Tiff), and returns the converted result. \nThe source file path and target format must be specified correctly. \nEnsure that the necessary permissions are in place to read the source file and write the converted file if applicable. \nThe conversion process occurs entirely on the cloud server, eliminating the need for any cloud storage or external downloads. \nIf the source file does not exist, is inaccessible, or if an error occurs during the conversion process, an appropriate exception will be thrown. \nSupported formats for conversion depend on the available libraries and their capabilities."

---

# Converts a chart of spreadsheet on a local drive to image.


> This method reads a chart of spreadsheet file from the local file system, converts it into the desired image format (e.g., PNG, SVG, Tiff), and returns the converted result. \nThe source file path and target format must be specified correctly. \nEnsure that the necessary permissions are in place to read the source file and write the converted file if applicable. \nThe conversion process occurs entirely on the cloud server, eliminating the need for any cloud storage or external downloads. \nIf the source file does not exist, is inaccessible, or if an error occurs during the conversion process, an appropriate exception will be thrown. \nSupported formats for conversion depend on the available libraries and their capabilities.





















































# Convert Excel files to other formats
Aspose.Cells Cloud provides robust support for Excel file format conversion, a process known for its intricacy. Aspose.Cells Cloud supports 30+ file formats, including Excel, Pdf, Markdown, Json, XML, Csv, Html, and so on.
Supported Features : Aspose.Cells Cloud provides REST API which supports converting Excel files to various format and offers SDKs for multiple programming languages. These programming languages are include of Net, Java, Go, NodeJS, Python, and so on. .
.landguage-index-ferture{
margin-top:9px;
}
.landguage-index-ferture span{
font-weight:bold;
}
.panelContainer {
width: 100%;
}
.cells-cloud-input-group {
display: flex;
margin: 15px auto 0;
border: 1px solid #eee;
border-radius: 10px;
background-color: #ffffff;
align-items: center;
justify-content: space-between
}
.cells-cloud-input-group-main {
flex-grow: 1;
display: inline-block;
padding: 0 4px;
color: #333;
display: inline-block;
}
.cells-cloud-input-group-prepend {
display: inline-block;
height: 52px;
border-radius: 10px 0 0 10px;
padding: 0 20px;
background-color: #e3e3e8;
color: #333;
line-height: 50px
}
.cells-cloud-input-group-method {
float: left;
padding-right: 4px;
color: #ccc;
}
.cells-cloud-input-group-main {
display: inline-block
}
.cells-cloud-input-group-append {
float: right;
}
.cells-cloud-link-button {
display: inline-block;
border: 1px solid transparent;
border-left: 1px solid #e3e3e8;
border-radius: 10px 10px 10px 10px;
padding: 0 20px;
outline: none;
box-shadow: none;
background-color: #1a89d0;
text-align: center;
vertical-align: middle;
color: #151617;
line-height: 20px;
font-size: 1rem;
font-weight: 400;
}
.cells-api-text{
text-align: left;
vertical-align: middle;
color: #151617;
line-height: 50px;
font-size: 1rem;
margin: 0 auto;
width: fit-content;
font-weight: 400;
}
.cells-cloud-action-button {
display: inline-block;
width: 100%;
border: 1px solid transparent;
border-left: 1px solid #e3e3e8;
border-radius: 10px 10px 10px 10px;
padding: 0 20px;
outline: none;
box-shadow: none;
background-color: #1a89d0;
text-align: center;
vertical-align: middle;
color: #151617;
line-height: 50px;
font-size: 1rem;
margin: 0 auto;
width: fit-content;
font-weight: 400;
}
PUT
/cells/convert/chart/image
```
package com.aspose.cloud.cells.api;
import com.aspose.cloud.cells.api.CellsApi;
import com.aspose.cloud.cells.request.*;
public class ConvertSpreadsheetExample {
public static void main(String[] args) {
try {
CellsApi api = new CellsApi(&#34;xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&#34;, &#34;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&#34;);
ConvertChartToImageRequest request = new ConvertChartToImageRequest();
request.setSpreadsheet(&#34;EmployeeSalesSummary.xlsx&#34;);
request.setworksheet(&#34;Sheet1&#34;);
request.setchartIndex(0);
request.setformat(&#34;png&#34;);
api.ConvertChartToImage(request);
} catch (ApiException e) {
e.printStackTrace();
}
}
}
```
#cellsconvert pre{
padding-left:10px;
padding-top:10px;
padding-bottom:10px;
margin-bottom:0px;
overflow:hidden;
}
function handleFileUpload(){
var fileInput = document.getElementById('convertupload');
var files = fileInput.files;
if (!files) return;
if (files.length === 1) {
var file = files[0];
var filename = file.name;
$(".upload-label").html(filename);
var codePreview = $("#cellsconvert code").text().trim();
codePreview = codePreview
.replace(/Spreadsheet = ".*?"/, `Spreadsheet = "${filename}"`)
$("#cellsconvert code").text(codePreview);
}else{
var fileNames = Array.from(files).map(file => file.name).join(', ');
$(".upload-label").html(fileNames);
var dictCode = 'var spreadsheets = new Dictionary\n {\n';
Array.from(files).forEach((file, index) => {
var fileName = file.name;
dictCode += ` { "${fileName}", File.OpenRead("path/to/${fileName}") }`;
if (index ')) {
codePreview = codePreview.replace(
/var spreadsheets = new Dictionary.*?};/s,
dictCode
);
}
$("#cellsconvert code").text(codePreview);
}
}
$('input[name="format"]').on('input', function() {
const format = $(this).val().trim().toLowerCase() || "pdf";
var codePreview = $("#cellsconvert code").text().trim();;
codePreview = codePreview
.replace(/format = ".*?"/,`format = "${format}"`)
.replace(/"result\..*?"/,`"result.${format}"`);
$("#cellsconvert code").text(codePreview);
});
$('input[name="outFormat"]').on('input', function() {
const format = $(this).val().trim().toLowerCase() || "pdf";
var codePreview = $("#cellsconvert code").text().trim();;
codePreview = codePreview
.replace(/outFormat = ".*?"/,`outFormat = "${format}"`)
.replace(/"result\..*?"/,`"result.${format}"`);
$("#cellsconvert code").text(codePreview);
});
$("#copycode").click(function() {
var textarea = document.createElement('textarea');
textarea.value = $("#cellsconvert code").text()
document.body.appendChild(textarea);
textarea.select();
var success = document.execCommand('copy');
document.body.removeChild(textarea);
});
Available SDKs
The Aspose.Cells Cloud SDK is available in multiple popular programming languages, enabling developers to integrate spreadsheet processing capabilities across various development environments.
GO
GO : ASPOSECELLSCLOUD
JAVA
MAVEN : ASPOSE.CELLS.CLOUD.POM.XML
.NET
NUGET : ASPOSE.CELLS-CLOUD
NODE.JS
NPM : ASPOSECELLSCLOUD
PERL
CPAN : ASPOSECELLSCLOUD-CELLSAPI
PHP
COMPOSER : ASPOSE/CELLS-SDK-PHP
PYTHON
PIP : ASPOSECELLSCLOUD
RUBY
GEM : ASPOSE_CELLS_CLOUD
.huizhang{
padding: 9px !important;
color: white !important;
margin-top: 25px !important;
display: inline-block !important;
width: 75% !important;
text-align: center !important;
border-radius: 5px !important;
}
.huizhang2{
padding: 9px !important;
color: white !important;
margin-top: 25px !important;
display: inline-block !important;
width: 19% !important;
text-align: center !important;
border-radius: 5px !important;
}
Resource Links
Cells Cloud Documentation
Cells Cloud API References
Cells Cloud Free Support
Cells Cloud Blog
Get Started for Free
Pricing Information
.huizhang{
padding: 9px !important;
color: white !important;
margin-top: 25px !important;
display: inline-block !important;
width: 75% !important;
text-align: center !important;
border-radius: 5px !important;
}
.huizhang2{
padding: 9px !important;
color: white !important;
margin-top: 25px !important;
display: inline-block !important;
width: 19% !important;
text-align: center !important;
border-radius: 5px !important;
}



