New Features of ZK Spreadsheet 1.0.0 RC2

From Documentation
DocumentationSmall Talks2009AprilNew Features of ZK Spreadsheet 1.0.0 RC2
New Features of ZK Spreadsheet 1.0.0 RC2

kindalu, Engineer, Potix Corporation
Apr 27, 2009
ZK 3.6.1 & ZK Spreadsheet 1.0 RC2


ZK Spreadsheet 1.0 RC2 is an online-spreadsheet Component.

It implements both User Interface at Client Side and Excel-like logic (225+ build in functions) at Server Side.

With RC2, we introduce an online spreadsheet application for demonstrating the power of this component with ZK Framework.

In addition to over 19 bug fixes, there are 11 new features.

A Spreadsheet Application

Menu of Functions

It provides a list of category of function like File, Edit, Insert...

Zss menu.PNG

Fast Icon Toolbar

Fast Icon Toolbar let user can quickly access the most common functions.

And also show the format of current selected area.

Zss fastIcon.PNG

Formula Bar

Formula Bar give user a larger space for entering longer formula or text

Zss formulabar.PNG

Muti-Sheets Supported Tabs

Just one click to change current sheet and all related sheet operations.

Zss multisheet.PNG

Quick Style Menu & Color Picker

Right click on the Selected Area, then the quick menu will pop up like row header/col header etc.

Zss QuickStyleMenu.PNG

Quick Keyboard Shortcut

When the focus on the spreadsheet, user can use keyboard shortcuts

Zss keyborad shortcut.PNG


You can click one button then add a chart.

Zss chart.PNG

Version Control

  • After saving file, the previous version will not disappear, you can roll back at anytime.(By File->Version history)

Rich User Interface


ZK Spreadsheet supports many styles such as font, font color, fill color ...etc. following table shows the styles that ZK Spreadsheet has supported.

Style Supported Notes
Font / Font Color / Fill Color Cause of browser limitation, font also depends on installed font on client side
Border / Border Color Cause of browser limitation, only solid/dashed/dotted border are supported now.
Horizontal Alignment Vertical Alignment has not implemented yet
Text Wrap & Overflow
Horizontal Merged Cell Vertical Merged Cell has not implemented yet

Following images are the screen shoot of EXCEL and ZK Spreadsheet

EXCEL Screen Shoot

Example excel.png

ZK Spreadsheet Screen Shoot



When user using ZK Spreadsheet, it is very easy and similar to using EXCEL. You could do in-place editing, use function, change the column size ...etc.

Selection and Highlight

Selection is a special rectangle to show an area of cells that been selected, it could be changed either by user or program. Highlight is a special rectangle too, but it only could be changed by program. You could use highlight to emphasize a area that are marked to do something such as copy.

Custom Row and Column Title

The default title of the rows and columns are "1, 2, 3 ..." and "A, B, C ...". However you can change it to custom titles by setting rowtitles and columntitles attributes.


Maximum Rows and Columns

Developer can control the maximum cells to be shown by setting maxrows and maxcolumns attributes. It is useful when you want to hide some data from user. It also has better performance because avoid loading too many data, that you don't want to show it, to client side.

Loading Cell on Demand

For the performance reason when showing with big data table, ZK Spreadsheet only load the necessary data to client side when scrolling.

Freezing Row and Column

By setting rowfreeze and columnfreeze attributes, you can freeze row and column on the left and top side of ZK Spreadsheet. This feature is useful when user browsing a report which has some title fields.


Image is supported in ZK Spreadsheet. In following example, it display two images in ZK Spreadsheet.


ZK Spreadsheet provide various events to notify what user have done, such as user start to edit a cell (onStartEditing) or press CTRL+C ( onCtrlKey ) to do something.

Editing Events

By listening onStartEditing, you can control which cell could be editing and what is the text to edit. By listening onStopEditing, you can check the committed value and even change it. In following example, only cell in C3:E5 could be editing and only numeric value is accepted.

Key Events

Like other standard ZK component, you can set keys which you are interested to ctrlKeys attribute and listen onCtrlKey event to handle it when user press those keys. In following example, it listen CTRL+C and CTRL+V to handle copy and paste of cell.

Mouse Events

Mouse events(onCellClick, onCellRightClick , onCellDoubleClick, onHeaderClick, onHeaderRightClick and onHeaderDoubleClick) are fired when user click on cell or header. In following example, it pop up a menu when user right click on a header.

Selection Events

There are two types of Selection events: onCellSelection and onSelectionChange. onCellSelection is fired after user select a area of cells by mouse drag or key (shift + arrow key). onSelectionChange is fired after user drag the dot area(right-bottom of a selection area), which change the selection area.


Built-in Functions

ZK Spreadsheet provides many built-in functions that are compatible with EXCEL formula. In following example, it uses several functions, such as PMT, IPMT, PPMT, to calculate payment for a loan.

Custom Functions

It is also possible to plug custom functions into ZK Spreadsheet. In following example, we plug-in an 'ECHO' function which simply concatenate all given values into a string.


Supported Operations

  • edit/change cell value, style and format
  • delete/insert row/column
  • merge/unmerge cell
  • cut/copy/paste
  • change size of row/column

how to use

  1. call the spreadsheet.pushCellState()/pushRowColSizeState() or other according functions before doing operation. It will save related state on selected area.
  2. call the spreadsheet.undo() or redo()

Frequently Asked Questions

  • Q: What is Excel File Format supported?
  • A: excel 97~2003 format based on 3rd party jxl library.
  • Q: Where could I get source code?
  • A: currently we are working on the license.


ZK Spreadsheet download page

Other Resources and Links

A Preview Of ZK Spreadsheet 1.0(with live demo)

New Features of ZK Spreadsheet 1.0.0 RC

Various Functions in Spreadsheet

Generate Huge Data Report in a Second

Integrate ZK Spreadsheet with Spring

Change the Style of Spreadsheet within 1 Min

Use JavaBean in Excel with ZK Spreadsheet

How to Build a Rich Excel Report with ZK Spreadsheet

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.