The image Aspose.Cell captures does not look like the original excel chart

@leoluo, what is the issue assigned to ticket #CELLSNET-57943? I didn’t find a description for the issue.

@leoluo, issue ID CELLSNET-57943 fix looks great! Thank you for sharing the output.

Now with respect to “KeyDrivers_G1_L17”, as you mentioned, the style of the arrow is different meaning the arrows in excel are slimmer and more sharper looking and that is what I’m expecting to get fixed.
But I have more pressing issues to pinpoint that I’m seeing in this particular chart. Please look at this screenshot of “KeyDrivers!G1:L17”
KeyDriversP1_G17.png (435.9 KB)

Highlighted as #1 in this screenshot shows the discrepancy in the spacing between the text and the arrow.
Highlighted as #2 shows how the text is overlapping the arrow.

This is the code I’ve used:

            // Access the worksheet
            Worksheet worksheet = workbook.Worksheets["KeyDrivers"];

            // Set the print area with your desired range in the worksheet
            worksheet.PageSetup.PrintArea = "G1:L17";
            worksheet.PageSetup.LeftMargin = 0;
            worksheet.PageSetup.RightMargin = 0;
            worksheet.PageSetup.TopMargin = 0;
            worksheet.PageSetup.BottomMargin = 0;
            // Clear any header/footer as they'll be captured when converting the worksheet to image
            worksheet.PageSetup.ClearHeaderFooter();

            // Set OnePagePerSheet option as true
            ImageOrPrintOptions options = new ImageOrPrintOptions()
            {
                OnePagePerSheet = true,
                ImageType = Aspose.Cells.Drawing.ImageType.Emf,
                HorizontalResolution = 100,
                VerticalResolution = 100,
                OnlyArea = true,
                SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
            };
            // Take the image of your worksheet
            SheetRender sr = new SheetRender(worksheet, options);
            string dataDir = @"C:\Aspose Test\KeyDriversP1_G17.emf";
            sr.ToImage(0, dataDir);

@JThomas98
Thanks for your confirm.
And we have opened the following new ticket :CELLSNET-57953 in our internal issue tracking system for “discrepancy in the spacing between the text and the arrow”

@JThomas98

The issue #1 is caused by different text wrap in the Cell. Please check the difference of the last word in the first line.
The text wrap may be different on different Windows with different system display scale setting.(e.g. 100%, 200%). Aspose.Cells takes the result on Windows with 100% system display scale setting as the rule. Please check the screenshot of Excel on Windows with 100% system display scale setting. It is same as Aspose.Cells generated result.
Screenshot_issue1_text_wrap.jpg (101.1 KB)

Hi @JThomas98
CELLSNET-57839 (Missing legend key) is fixed, it will take effect in version 25.3.
CELLSNET-57839-fix.png (23.6 KB)

This issue is different from the cause of “CELLSNET-55343”, and we have all conducted tests so you don’t have to worry about the problem of “CELLSNET-55343” appearing again.

Sometimes the logic of excel for legend is complex, if you encounter other issues, please pointing out them, we will continue make corrections. Thank you.

@peyton.xu ,
Issue #1 seems to no longer be an issue. I appreciate the suggestion! Please take a look at the output comparison of aspose output to excel when scaling is set to 100%.
KeyDriversP1_G16_Scaling100.png (111.3 KB)

@leoluo,
This is looking good. Thank you for letting me know this had nothing to do with the previous issue of legends missing.

@JThomas98,

Thanks for the screenshot and details.

I noticed the value “+0.02” is still overlapping even in 100% display settings. We have logged your findings and screenshot with the existing ticket “CELLSNET-57953” into our database. We will evaluate it soon.

You are welcome and thank you for confirming that it’s unrelated to the previous issue of missing legends.

1 Like

@leoluo, I just remembered that this issue (CELLSNET-57839) had two parts:

  1. Missing legends
  2. Blue headers had vertical lines across it.

In the screenshot you shared, I see that the legends issue has been fixed and I also don’t see the lines in the blue header. So my assumption is that both parts of the issue has been fixed. Am I right?

@JThomas98,

Yes, your understanding is correct. The reported issue (Ticket ID: “CELLSNET-57839”) had two components: missing legend entries and blue headers displaying vertical lines. We confirm that both problems have been resolved. Hopefully, if all goes as planned, the new version (Aspose.Cells for .NET v25.3) is expected to be released next week.

Sounds good. Thank you!

@JThomas98,

You are welcome. We will keep you updated on the new version as soon as it becomes available.

Any progress on these tickets?
CELLSNET-57840
CELLSNET-57841
CELLSNET-57938
CELLSNET-57939
CELLSNET-57953

@JThomas98
We are still working hard to study and solve these issues. Once there is an update, we will notify you promptly.

Hi @JThomas98
About the lines in the blue header, it is the cell render outside the chart, it’s strange that I did not reproduce it here.
The research and reproduction of this lines issue may have to wait until you use 25.3. If this issue still exists on your side in 25.3, we will continue to try to reproduce it. Before the release of 25.3 we are continuing to work on other issues, hope to solve more, such as those you mentioned:
CELLSNET-57840
CELLSNET-57841
CELLSNET-57938
CELLSNET-57939
CELLSNET-57953

Thank you, I’ll keep an eye out for the blue header in 25.3

@JThomas98,

Sure, we will keep you posted with updates on new version once available.

Hi, I don’t see the ticket CELLSNET-57940 anywhere in the issue status. Just want to make sure nothing is missed.

This is what I’m referring to.

@JThomas98,

I noticed that issues CELLSNET-57940 and CELLSNET-57941 were unlinked. I have now re-linked the tickets to the thread.