Change the Style of Spreadsheet within 1 Min

From Documentation
Revision as of 08:00, 13 January 2011 by Murasakiwu (talk | contribs) (→‎Live Demo)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
DocumentationSmall Talks2008AprilChange the Style of Spreadsheet within 1 Min
Change the Style of Spreadsheet within 1 Min

Ivan Cheng, Engineer, Potix Corporation
April 25, 2008
Applicable to ZK 3.0.5 and later
Applicable to ZK Spreadsheet 1.0.0 and later


In Use JavaBean in Excel with ZK Spreadsheet, we demonstrate how to use JavaBean directly via Variable-Resolver. In this article, we will introduce another practical application about how to change the style of spreadsheet with ease. No modification of data model is required. In the following paragraphs, I will show you how to change the style of spreadsheet.

If you'd like to know more about ZK Spreadsheet, please refer to the following URLs:

If you'd like to know more about Variable-Resolver, please refer to the following URL:

Let's start to build an application for calculating balance sheet with Variable-Resolver.

Live Demo

How to Build a Template Using Excel

Design a New Layout Template in Excel



Define External Variable

Input bean and its data names NewSheet.xls, such as dataBean.item, dataBean.liquidAssets, dataBean.fundInvestment etc.


Change the Style of Spreadsheet


  <listbox id="style" mold="select" rows="1" onSelect="changeStyle()">
	<listitem label="Style 1" value="/BalanceSheet.xls"/>
	<listitem label="Style 2" value="/NewSheet.xls"/>
	void changeStyle() {  //Change the URL of spreadsheet
			balance.url = style.getSelectedItem().value;

  <spreadsheet id="balance" url="/BalanceSheet.xls" maxrow="40" maxcolumn="20" height="600px" width="1300px"/>



It becomes more convenient to integrate server side resource by binding Java Bean with spreadsheet. This feature simplifies developer's job to meet the user's requirement of style. In the near future, we will introduce more useful tools of ZK Spreadsheet. We expect your response to make it better, feel free to leave a message or post it to ZK forum.

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