Hi,
I'm using SfSpreadSheet to display excel files in my WPF application and it worked fine most times, while a few excel files are making troubles. When I try to open them, the control crushed and it seems a font problem there. Here is the exception info:
System.Collections.Generic.KeyNotFoundException:
In MS.Internal.FontCache.FontFaceLayoutInfo.IntMap.System.Collections.Generic.IDictionary<System.Int32,System.UInt16>.get_Item(Int32 i)
In Syncfusion.UI.Xaml.Spreadsheet.Helpers.SpreadsheetTextBoxPaint.MeasureTextUsingGlyphs(SpreadsheetGrid grid, String text, IStyle excelStyle, Boolean& isCalculated, Object& textElement)
In Syncfusion.UI.Xaml.Spreadsheet.Helpers.SpreadsheetTextBoxPaint.MeasureText(SpreadsheetGrid grid, String text, SpreadsheetColumn column, Double cellWidth, Boolean wraptext, Int32 lineCount, Object& textElement)
In Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetColumn.GetDisplayTextSize(String text, Size cellSize, Boolean wrapText)
In Syncfusion.UI.Xaml.CellGrid.Helpers.GridFloatingCellHelper.SetDisplayTextSize(GridColumn column, Boolean wrapText)
In Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetColumn.OnUpdateColumn(FrameworkElement& oldElement)
Well, the control seems unable to find the correct font size when using the SpreadsheetTextBoxPaint.MeasureTextUsingGlyphs method, I've no idea how to solve this.
Could you help me?
Thank you!
Yi Zhou