Getting Started with the Kendo UI for Vue Spreadsheet
This guide provides essential information about using the Kendo UI for Vue Spreadsheet package. You will learn how to install the Spreadsheet package, add a Spreadsheet component to your project, style the component, and activate your license.
After completing this guide, you will be able to reproduce the following example.
Before You Begin
npm create vite@latest my-app -- --template vue-ts
This guide requires that you have basic knowledge of Vue and TypeScript, and that you have already created a blank Vue project.
Install the Component
npm i @progress/kendo-vue-spreadsheet
Importing the Component
After installing the package, import the Spreadsheet component in the Vue App.
In the src/App.vue file of your Vue project, import the Spreadsheet component from the Spreadsheet package.
import { Spreadsheet } from '@progress/kendo-vue-spreadsheet';
Using the Component
-
After installing the Spreadsheet package and importing the components, add the Spreadsheet tag to the App component file of your Vue project (for example,
src/App.vue). -
Load the JSON sheets data in the
defaultPropsof the Spreadsheet in order to display initial Excel document in the component.html<template> <Spreadsheet :style="{ width: '100%', height: '700px' }" :default-props="{ sheets: data }" /> </template> <script setup lang="ts"> import { Spreadsheet } from '@progress/kendo-vue-spreadsheet'; import { data } from './data'; </script>The Spreadsheet reads the
defaultPropsonly when it mounts. To load other data later, use thefromJSONmethod. -
To style the Spreadsheet, install and import the Default theme, which is one of the three beautiful themes for Kendo UI for Vue.
3.1. Install the Default theme package.
shnpm i @progress/kendo-theme-default3.2. Import the CSS file from the package in
src/App.vue. Add this import before your existingApp.cssimport.jsimport '@progress/kendo-theme-default/dist/all.css'; -
Build and run the application by typing the following command in the root folder of your project:
shnpm run dev -
Navigate to http://localhost:5173 to see the Kendo UI for Vue Spreadsheet component on the page.
Activating Your License Key
Important: The Kendo UI for Vue Spreadsheet is a premium component that requires a license key file to be installed in your project. This applies to both trial and commercial usage:
- Trial usage: Start a free trial and download a trial license key file
- Commercial usage: Purchase a license and download a commercial license key file
Without a valid license key file, the component will display licensing warnings and watermarks.
Follow the instructions on the Kendo UI for Vue My License page to download and install your license key file. You can skip this step if your application already contains a Kendo UI for Vue license file.
Dependencies
The Spreadsheet package requires you to install the following peer dependencies in your application:
| Package Name | Description |
|---|---|
| vue 3.0.0* | Contains the functionality necessary to define Vue components. |
| @progress/kendo-drawing | Contains the Drawing library, which provides interactive vector graphics. |
| @progress/kendo-licensing | Contains the internal infrastructure related to licensing. |
| @progress/kendo-vue-animation | Enables the animations in the Kendo UI for Vue components. |
| @progress/kendo-vue-buttons | Contains the Kendo UI for Vue Buttons components. |
| @progress/kendo-vue-dropdowns | Contains the Kendo UI for Vue Dropdowns, which allows users to choose from a predefined list of options. |
| @progress/kendo-vue-inputs | Contains the Kendo UI for Vue Inputs components. |
| @progress/kendo-vue-intl | Contains the Kendo UI for Vue Internationalization package that applies the desired cultures by providing services and pipes for the parsing and formatting of dates and numbers. |
| @progress/kendo-vue-layout | Contains the Kendo UI for Vue Layout components. |
| @progress/kendo-vue-popup | Contains the Kendo UI for Vue Popup component. |
| @progress/kendo-vue-progressbars | Contains the Kendo UI for Vue ProgressBar component. |
| @progress/kendo-vue-spreadsheet | Contains the Kendo UI for Vue Spreadsheet component. |
| @progress/kendo-vue-treeview | Contains the Kendo UI for Vue Treeview components. |
| @progress/kendo-vue-upload | Contains the Kendo UI for Vue Upload components. |
| @progress/kendo-svg-icons | Contains the Kendo UI SVG icons. |