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

  1. The arrows/bullets that point at the intersection of the different sections of the chart is somehow not pointing at the intersection. It’s a little off.
  2. A couple of the charts are missing labels.
  3. The check marks in the charts are pushed further to the right when it’s supposed to be closer to the box with the value.
  4. One chart is missing an outline border.
    Here’s the test file:
    Test2.zip (1.5 MB)

@JThomas98,

Thank you for providing us with the template Excel file and MS Word documents to demonstrate the issues.

We were able to reproduce the issues you mentioned (as per the screenshots in the Word document you attached) by directly converting your template Excel file to PDF (while setting the printable area of the DetailCharts sheet to “B73:M1405”).
e.g.,
Sample code:

string filePath = "e:\\test2\\ChartTest.xlsm";
//Load the Excel file
Workbook workbook = new Workbook(filePath);

// Access the worksheet
Worksheet worksheet = workbook.Worksheets["DetailCharts"];
// Set the print area with your desired range in the worksheet
worksheet.PageSetup.PrintArea = "B73:M1405";

workbook.Save("e:\\test2\\out1.pdf");

We have logged separate issues (as following) for each of the mentioned issues.

– The arrows/bullets that point at the intersection of the different sections of the chart is somehow not pointing at the intersection. It’s a little off. (CELLSNET-56278)

– A couple of the charts are missing labels. (CELLSNET-56280)

– The check marks in the charts are pushed further to the right when it’s supposed to be closer to the box with the value. (CELLSNET-56282)

– One chart is missing an outline border. (CELLSNET-56283)

Once we have an update on any of the issues, we will let you know.

@amjad.sahi, thanks for the update. Looking forward to these fixes.

@JThomas98,

You are welcome. And, sure, we will keep you posted with updates on the logged issues (once available).

Hi @JThomas98

For CELLSNET-56280 (missing x-axis) and CELLSNET-56278(arraw not pointing at the intersection), we have made the optimization, the results are attached(I marked them with a red circle), the rest of the problem we are dealing with, as soon as there is progress, we will inform you.

240724.zip (1.4 MB)

@leoluo,
Really appreciate how quickly you guys resolve these issues. Thanks.

@JThomas98,

You are welcome. We will keep you posted with updates once they are available on the remaining issues.

For the border line missing issue in Page 10, it is the cell boder. Take Cell M470 for example, Cell M470 doesn’t have the right border, the border displayed is the left boder of Cell N470. You can use the following code to check it.

Worksheet worksheet = wb.Worksheets["DetailCharts"];

Cell M470 = worksheet.Cells["M470"];
Console.WriteLine(M470.GetStyle(false).Borders[BorderType.RightBorder].LineStyle);
Cell N470 = worksheet.Cells["N470"];
Console.WriteLine(N470.GetStyle(false).Borders[BorderType.LeftBorder].LineStyle);

But the print area doesn’t inlude column N, so the boder is missing.

If you printview the source file in Excel, you will find the border is also missing in Excel printview.

Hi @JThomas98
For CELLSNET-56282, we optimized the location of check marks as shown in the figure below, This will take effect in Aspose.Cells 24.8.
240727.png (44.4 KB)

@peyton.xu, I see what you’ve pointed out. I’ve managed to fix that on my end. Thank you!

@leoluo, This is exactly what I’m looking for. Thank you!

@JThomas98,

You are welcome. And, thanks for your confirmation.

1 Like

The issues you have found earlier (filed as CELLSNET-56198,CELLSNET-56278,CELLSNET-56280,CELLSNET-56282) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi

Hi, Aspose team.
I did some more testing and looks like all of the issues I previously reported have been fixed in this new release. Unfortunately, I have noticed another issue.
In most of the images that aspose captures, the font size if much smaller compared to what is in excel. And also in some cases, the font seems to be substituted with another font.
Test.zip (9.3 MB)

@JThomas98
We can reproduce the issue by testing on the latest version v24.8 using sample files and the following sample code. I found that the text became smaller when converting the file to an image. Please refer to the attachment. out_net.jpg (139.3 KB)

//Load the Excel file
Workbook workbook = new Workbook(filePath + "ChartTest.xlsm");

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

// Set the print area with your desired range in the worksheet
worksheet.PageSetup.PrintArea = "C3:D23";

// Set OnePagePerSheet option as true
ImageOrPrintOptions options = new ImageOrPrintOptions();
options.OnePagePerSheet = true;
options.ImageType = ImageType.Jpeg;
// Take the image of your worksheet
SheetRender sr = new SheetRender(worksheet, options);
string dataDir = filePath + "out_net.jpg";
sr.ToImage(0, dataDir);

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-56510

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

In addition, The charts int the sample file use Theme font. Please refer to the attachment. chart_body.jpg (99.7 KB)

If Theme Font is selected, the font name will display different in different regions . If you do not want that the font is automitally changed in different regions, don’t select the Theme Fonts . Regarding theme fonts, please refer to the following document.

@JThomas98
We also found some of the text in the chart and font rendering are not the same as Excel. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-56511

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Thank you for looking into it. Looking forward to the fix.

@JThomas98,

Sure, we will keep you posted with updates on the issues (once available).

@JThomas98 ,

Because FitToPageWide and FitToPageHeight is set in PageLayout in the source file, the page content will be scaled during output, so the font size may be smaller. Also, the output of Aspose.Cells mathes the printview in Excel or the pdf manually saved by Excel.
ChartTest_SavedByExcel.pdf (132.1 KB)

Also, if you want to the output of Aspose.Cells matches what you see with NormalView in Excel, please also enable ImageOrPrintOptions.OnlyArea, the output will be closer to the NormalView in Excel.

I tried the OnlyArea property and here’s the output
Test.zip (1.6 MB)

If you compare it with the output from office interop, you’ll see that there seems to be an extra page added at the end of page 48.
And the text still seems to be smaller in some cases.