This is a migrated thread and some comments may be shown as answers.

Server Import/Export: FontFamily not take into account

1 Answer 17 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Heiko asked on 23 Feb 2021, 01:26 PM


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

Sort by
Telerik team
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:

You could use the fontFamily method and the approach described below to achieve the desired functionality.

The stylesheets of the newly added fonts if any should be referenced.
For example:


<link href="" rel="stylesheet">

You need to get a reference of the DropDownList which contains the fonts:

var ddls = $('.k-spreadsheet-toolbar [data-role="dropdownlist"]')[0];
var ddl = $(ddls).data("kendoDropDownList");

Then, you could set the list of the fonts using DropDownList setDataSource method:

var dataSource = new{
    data: [ "Arial", "Arial Black", "Verdana", "Lobster" ]

You need to subscribe to the 'select' event of the DropDownList:

ddl.bind("select", onSelect);

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:

function onSelect(e){          
    var fontName = e.item.text();
    var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
    var sheet = spreadsheet.activeSheet();   
    var selection = sheet.selection();

Here is a dojo sample showing this approach: 

I hope you will find this information useful.

Best Regards,
Progress Telerik

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

Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question