Chart to Image conversion - Missing bars in bar chart in .NET

Hi,

when I create an image from a range, the chart inside is included but not the bars.

This is the code:
Workbook w2 = new Workbook(“data_V11.xlsx”);
Worksheet excelWorksheet = w2.Worksheets[“Sheet3”];
Aspose.Cells.Range range = excelWorksheet.Workbook.Worksheets.GetRangeByName(“BIPLI_chart”);
string startCell = CellsHelper.CellIndexToName(range.FirstRow, range.FirstColumn);
string endCell = CellsHelper.CellIndexToName(range.FirstRow + range.RowCount - 1, range.FirstColumn + range.ColumnCount - 1);
string rangeAddress = string.Format("{0}:{1}", startCell, endCell);

        ImageOrPrintOptions options = new ImageOrPrintOptions();
        options.AllColumnsInOnePagePerSheet = true;
        options.ImageType = Aspose.Cells.Drawing.ImageType.Emf;
        options.OnePagePerSheet = true;
        options.HorizontalResolution = 600;
        options.VerticalResolution = 600;
        options.OnlyArea = true;

        Aspose.Cells.PageSetup pageSetup = excelWorksheet.PageSetup;


        pageSetup.PrintArea = rangeAddress;
        using (MemoryStream imageStream = new MemoryStream())
        {
            SheetRender sr = new SheetRender(excelWorksheet, options);
            sr.ToImage(0, imageStream);
            Image.FromStream(imageStream).Save("pic.png", ImageFormat.Emf);
            //imagePartsList.Add(rangeName, );
        };

And here the file with the result: for testing.zip (46.6 KB)

we use version 20.9.0.0

Kind regards,
Guido

@Nachti,

Please notice, we were able to reproduce the issue as you described by using your template file and sample code. We have logged a ticket with an id “CELLSNET-47667” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

@Nachti,
Please try our latest version/fix: Aspose.Cells for .NET v20.10.7:

Aspose.Cells20.10.7 For .Net4.0.Zip (5.4 MB)
Aspose.Cells20.10.7 For .Net2_AuthenticodeSigned.Zip (5.4 MB)

Your issue should be fixed in it.

Let us know your feedback.

The issues you have found earlier (filed as CELLSNET-47667) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao