Setting Up ZK Spreadsheet
Follow the simple setups below to start using ZK Spreadsheet.
Start using ZK Spreadsheet!
Installing the Libraries
The setup procedure depends on your choice of IDE. The most important part is including both ZK Spreadsheet and ZK’s JAR files in your project. The project should be a ZK Project or a Web Application Project depending on the environment you are using.
A Very Basic Application
Having completed setting up ZK and ZK Spreadsheet, we'll also need to prepare a Excel file as a source of the spreadsheet. We then create an index.zul file to contain the spreadsheet as shown in the code below:
<?xml version="1.0" encoding="UTF-8"?> <zk xmlns="http://www.zkoss.org/2005/zul"> <spreadsheet src="/demo_sample.xls" maxrows="200" maxcolumns="40" hflex="1" vflex="1"></spreadsheet> </zk>
- src: The source file of the spreadsheet
- maxrows: The maximum number of columns of this spread sheet
- maxcolumns: The maximum number of rows of this spread sheet
- hflex and vflex: ZK's attribute, refer to 
This gives us our very first ZK Spreadsheet application. When the code is started, navigate to index.zul and the following page should be displayed.
Congratulations! That is all it takes to embed ZK Spreadsheet within your ZK application.
All source code listed in this book is at Github.