Free Support Forum -

Charts with NA() do not get processed

The attached chart has several formulas in it and the series range updates automatically whenever a new entry is added.

Offset (under name manager)

There are also some cells that have NA( ) for the purposes of the Offset function.

Consequently the chart is not getting processed by Aspose.Cells5.3.3.2

Any ideas what is going on?



Kindly paste your sample code and attach the output file (if you have) to explain what you are doing with the source range and to reproduce the issue on our end. We will check your issue soon.

Thank you.

Here is a code sample…<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

private bool ExtractChart(Worksheet sheet) {

if (sheet.Charts.Count > 0) {

try {

var options = new ImageOrPrintOptions { HorizontalResolution = 300, VerticalResolution = 300 };

var chartImage = sheet.Charts[0].ToImage(options); // Exception is thrown when calling ToImage()

I'm thinking that issue has more to do with having a series refer to a named formula not the NA()

This seems to be working with xls files but not xlsx files.

Can we get this to work for xlsx files?



I have tested it with our latest version/fix v6.0.0.1, it works fine with it. Please try the attached version. I used the following sample code:

Sample code:

var options = new ImageOrPrintOptions();
options.ImageFormat = System.Drawing.Imaging.ImageFormat.Tiff;
options.HorizontalResolution = 300;
options.VerticalResolution = 300;
options.TiffCompression = TiffCompression.CompressionLZW;
Workbook wb = new Workbook(“e:\test2\Print.xlsx”);
Chart chart = wb.Worksheets[0].Charts[0];
chart.ToImage(@“e:\test2\outputimage.tif”, options);

Thank you.