We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Quality of picture taken from graph in Excel is low

Hi,

I took a picture from an excel file but
the quality of graph seems low. If I compare with the orginal I can see

  • darker color
  • shadow
  • jagged eges
  • different font

I followed the default instructions. Any suggestions to get a better picture:

Here is my code:
xlsLic.SetLicense(“Aspose.Total.lic”);
wordlic.SetLicense(“Aspose.Total.lic”);

        string fileName = @"Balance Sheet_V20.xlsx";
        Workbook workbook = new Workbook(fileName);
        workbook.Settings.CultureInfo = new CultureInfo("en-US");
        CultureInfo cult = new CultureInfo("en-US");           
        
        Worksheet worksheet = workbook.Worksheets["Charts"];

        ImageOrPrintOptions options = new ImageOrPrintOptions();
        options.AllColumnsInOnePagePerSheet = true;
        options.ImageFormat = ImageFormat.Emf ;
        options.OnePagePerSheet = true;
        options.HorizontalResolution = 300;
        options.VerticalResolution = 300;
        options.OnlyArea = true;

        Aspose.Cells.PageSetup pageSetup = worksheet.PageSetup;
        pageSetup.IsPercentScale = false;
        pageSetup.SetFitToPages(1, 1);
        pageSetup.PrintArea = "A2:I20"; 

        SheetRender sr = new SheetRender(worksheet, options);
        sr.ToImage(0, "output graph.emf");

        Document doc = new Document();
        DocumentBuilder builder = new DocumentBuilder(doc);
        builder.InsertImage("output graph.emf");

        doc.Save("output graph.docx");

Here the file Balance Sheet_V20.zip (46.1 KB)

Kind regards,

@christoph_schroeder01_sap_com,

Thanks for your query.

We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-46495 - Issues while converting chart to image

@christoph_schroeder01_sap_com,

This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-46495”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

The issues you have found earlier (filed as ) have been fixed in Aspose.Cells for .NET v18.12. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi