Free Support Forum -

Problem with ToImage function applied to a line-with-markers chart


While using Aspose.Cells 4.4.3 (when ToImage function will be released in the java API ? I know, soon ^^ ) to export my line-with-data-markers chart in jpg or png, i’ve got a little trouble.

All the lines end with null values but that’s dreamed values. It’s not in my chart data.

Any idea to solve that ?
I join an example done with Aspose.Cells and one with vba in Excel.

Here is the code used in C#:
Workbook workbook = new Workbook();
Worksheet worksheet=workbook.Worksheets[0];
Chart chart=worksheet.Charts[0];
Bitmap bitmap = chart.ToImage();
bitmap.Save(“C:\myChart.png”, System.Drawing.Imaging.ImageFormat.Png);

nb: I use a temp licence file and the excel file has been produced by Aspose.Cells 1.9.4 in Java

Thx for your help

and the same one exported with Excel:


Could you try the attached version. If you still find the issue, kindly post your template xls file here. We will check it soon. And related java chart 2 image feature, we will look into it after completing some important tasks on hand.

Thank you.

that’s better…
but 'coz I don’t have a definitive licence, it exports a 972x11434 picture :smiley: (it’s like when I tried the original API without a temp licence)

but it’s ok, there’s no more null values at the end of the lines.

Thx for the reactivity ^^