New to Kendo UI for Angular? Start a free 30-day trial

Opening an Excel File from Blob or Base64 Data in Angular Spreadsheet


ProductProgress® Kendo UI® for Angular Spreadsheet


I want to open an Excel file from a Blob object or Base64 string data in the Kendo UI for Angular Spreadsheet component. How can I implement this?


To load an Excel file from a Blob object in the Kendo UI for Angular Spreadsheet component, use the fromFile method of the SpreadsheetWidget and provide the Blob as an argument.

public onImport(spreadsheet: SpreadsheetComponent): void {

If the Excel file is represented as a Base64 data, the string must be converted to a Blob object first.

public onImport(spreadsheet: SpreadsheetComponent): void {
    const blob: Blob = base64toBlob(base64String);

The base64toBlob is a custom function whose implementation is demonstrated in detail in the Creating a Blob from a base64 string in JavaScript StackOverflow thread.

The following example demonstrates how to open an Excel file from Base64 string data.

View Source
Change Theme:

In this article

Not finding the help you need?