Saving indvidual excel charts

dear Aspose support,


thnak you for this wonderfull project - this has saved me lots time and money.

For a new application, I am calculating a spreadsheet in a .NET environment with several graphical components ( bar charts, bubble charts… ).

Is it possible to save the individual graphical components ( just the individual charts, not the comnplete excel sheet ) as jpeg ?

thank you for your much appreciated help.

guido

Hi,


Sure, you may utilize our Chart to Image feature to render image files from charts, see the document for your reference: Chart to Image|Documentation

Thank you.
After some evaluation, I found the answer. Sorry for the overhead.

Dim x As New Aspose.Cells.Workbook("C:\ikke.xlsx")
Dim y As Aspose.Cells.Worksheet = x.Worksheets(0)
For Each z As Aspose.Cells.Charts.Chart In y.Charts
z.ToImage("C:\ikke.jpeg", System.Drawing.imaging.imageformat.jpeg)
Next z


Hi Guido,

Thanks for your posting and using Aspose.Cells.

It is good to know that you were able to sort out this issue. Let us know if you encounter any other issue, we will be glad to look into it and help you further.


So further to this, if I want to save an area of the sheet, that has multiple charts and other objects included ( rectangles, pictires, lines...), how could this be done ?

How would I be able to select a number of objects ? Selecting an area of the screen based on a location doesnt look very robust. Ideally, I would like to select multiple objects by name and then pront them into a single jpeg file.

thank for your thoughts.


Hi Guido,

Thanks for your posting and using Aspose.Cells.

As a workaround, you can export range of cells inside the worksheet to image. Please see the following documentation article that illustrates this method.