From Documentation
Revision as of 06:29, 17 April 2012 by Southerncrossie (talk | contribs)


ZK Spreadsheet provides sheetbar to perform sheet actions such as select sheet, add sheet, delete sheet etc...

Show Sheetbar

Use Spreadsheet.setShowSheetbar to show sheetbar.

ZKSsEss Spreadsheet Sheetbar.png

Add Sheet

Click the button to add sheet
ZKSsEss Spreadsheet Sheetbar addSheetButton.png

The new sheet name prefix uses Sheet, this is changable by using I18N key zss.sheet
ZKSsEss Spreadsheet Sheetbar addedSheet.png


Each button/menuitem map to a key, developers can browse all I18 keys by Action.getLabelKeys

Here are the partial keys for the sheetbar

Action I18 Key
Sheet zss.sheet
Add Sheet zss.addSheet
Delete Sheet zss.deleteSheet
Rename Sheet zss.renameSheet
Move Sheet Left zss.moveSheetLeft
Move Sheet Right zss.moveSheetRight
Protect Sheet zss.protectSheet

Refer to sample


Here is a sample example ZUL file

	<window vflex="1" width="100%" apply="org.zkoss.zssessentials.config.SheetbarComposer">
		<button id="toggleSheetbar" label="Toggle sheetbar"/>
		<spreadsheet showSheetbar="true"
			id="spreadsheet" vflex="true" width="100%"
			src="/WEB-INF/excel/config/ZSS-demo_sample.xlsx" maxcolumns="40" maxrows="200"

View complete source of ZUML sheetbar.zul


The composer uses Spreadsheet.setShowSheetbar to show or hide 'sheetbar'.

	public void onClick$toggleSheetbar() {
		boolean toggle = !spreadsheet.isShowSheetbar();

See the full source code for Composer here

Version History

Last Update : 2012/04/17

Version Date Content
2.3.0 April, 2012 Sheetbar

All source code listed in this book is at Github.

Last Update : 2012/04/17

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