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

Free Support Forum - aspose.com

Aspose.Cells recognizes fonts in chart incorrectly

Hi,


When loading a workbook with a chart, I noticed the fonts were recognized incorrectly.

Code:

var workbook = new Workbook(@“test.xlsx”);
Console.Write(chart.SecondValueAxis.Title.Text); // Print "出来高 (1,000株)"
Console.Write(chart.SecondValueAxis.Title.Font.IsBold); // Print True (Supposed to be false)
Console.Write(chart.SecondValueAxis.Title.Font.Name); // Print “Arial Narrow” (supposed to be MS PGothic)

The font in the title of second value axis is recognized as “Arial Narrow” in bold but in fact in the original excel file it is “MS PGothic” in regular weight.

I’ve attached the test file and screenshot for your reference. Could you please have a look into this?

Thanks

Hi,


Thanks for the template file and sample code with details.

After an initial test, I observed the issue as you mentioned by using the following sample code with your template file. I found that Aspose.Cells recognizes fonts in the chart incorrectly. The font in the title of second value axis is recognized as “Arial Narrow” in bold but in fact in the original Excel file it is “MS PGothic” in regular weight:
e.g
Sample code:

var workbook =
new Workbook(“e:\test2\test.xlsx”);

Chart
chart = workbook.Worksheets[0].Charts[0];<o:p></o:p>

Console.Write(chart.SecondValueAxis.Title.Text); // Print "出来高 (1,000)"

Console.Write(chart.SecondValueAxis.Title.Font.IsBold); // Print True (Supposed to be false)

Console.Write(chart.SecondValueAxis.Title.Font.Name);
// Print “Arial Narrow” (supposed to be MS
PGothic)


I have logged a ticket with an id “CELLSNET-45397” for your issue. We will look into it soon.

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

Thank you.

@ServerSide527,

Could you provide us your template Excel file “test.xlsx” again as we lost it during migration process from older forums to new Dynabic.Discourse. We need the file to evaluate your issue precisely.

test45397.zip (8.9 KB)

Please find the test file attached.

@ServerSide527,

Thanks for providing us template file.

Hopefully your issue will be sorted out soon.

@ServerSide527

Please download and try the latest fix and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-45397) have been fixed in Aspose.Cells for .NET 17.10.