Free Support Forum -

How to convert a Chart Image from a folder using Aspose.Cells Cloud API

I am using to save a chart as an image.

However, when i try add the folder using ?folder=foldername it throw an error. could your advise ?


Thanks for your inquiry. You may use Aspose.Cell Cloud SDK for .NET as following to save the chart image from a file in specified folder. However, we are investigating the REST API issue and will update you soon.

static CellsChartsApi cellsChartsApi = new CellsChartsApi("client_credentials", MyAppSid, MyAppKey);
// Invoke Aspose.Cells Cloud SDK API to convert chart to image

var apiResponse = cellsChartsApi.CellsChartsGetWorksheetChart(fileName, sheetName, chartNumber, format,folder,null);

// Save stream response to image file
Console.WriteLine("Expected response type is Stream: " + apiResponse.Length.ToString());                                               
var fileStream = System.IO.File.Create("C:\\Temp\\test.png");


Please find sample cURL command for saving the chart image from a file in the specified folder. Hopefully it will help you to accomplish the task.

curl -v "" -X GET -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: Bearer [Access_Token]" --output C:/Temp/chart.png

1 Like

Excellent! thanks @tilal.ahmad all works perfectly now. thanks for the pointer.