When I load an Excel-File from disk to show it inside Spreadsheet component the font families are not taken into account. For example, I formatted a cell with Arial Black, but it only shows Arial. How can I ensure that the fonts are included in the import?
1 Answer, 1 is accepted
answered on 26 Feb 2021, 10:26 AM
There is no built in configuration which allows you to add a font to the Spreadsheet font list in the toolbar dropdown. However, you could add a font to the drop-down font list of the SpreadSheet as it is described in the following knowledge-base article:
In the select event handler, you could check the selected font. A reference of the Spreadsheet widget is needed. You could check the current selection by using selection() method. The font could be applied, by using range fontFamily method:
var fontName = e.item.text();
var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
var sheet = spreadsheet.activeSheet();
var selection = sheet.selection();
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.