Change the Style of Spreadsheet within 1 Min"

From Documentation
m (Created page with '{{Template:Smalltalk_Author| |author=Ivan Cheng, Engineer, Potix Corporation |date=April 25, 2008 |version=Applicable to ZK 3.0.5 and later ::Applicable to ZK Spreadsheet 1.0.0 …')
 
 
(8 intermediate revisions by 3 users not shown)
Line 11: Line 11:
 
=Introduction=
 
=Introduction=
  
In [http://docs.zkoss.org/wiki/Use_JavaBean_in_Excel_with_ZK_Spreadsheet 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.
+
In [[Small_Talks/2008/April/Use_JavaBean_in_Excel_with_ZK_Spreadsheet | 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 ZK Spreadsheet, please refer to the following URLs:
  
* [http://docs.zkoss.org/wiki/New_Features_of_ZK_Spreadsheet_0.7.0 New Features of ZK Spreadsheet 0.7.0]
+
* [[Small_Talks/2008/February/New_Features_of_ZK_Spreadsheet_0.7.0 | New Features of ZK Spreadsheet 0.7.0]]
  
* [http://docs.zkoss.org/wiki/A_Preview_of_ZK_Spreadsheet_Component A Preview of ZK Spreadsheet Component]
+
* [[Small_Talks/2007/December/A_Preview_of_ZK_Spreadsheet_Component | A Preview of ZK Spreadsheet Component]]
  
* [http://docs.zkoss.org/wiki/A_Sip_of_the_ZK_Spreadsheet_Component A Sip of the ZK Spreadsheet Component]
+
* [[Small_Talks/2007/September/A_Sip_of_the_ZK_Spreadsheet_Component | A Sip of the ZK Spreadsheet Component]]
  
* [http://docs.zkoss.org/wiki/How_to_Build_a_Rich_Excel_Report_with_ZK_Spreadsheet How to Build a Rich Excel Report with ZK Spreadsheet]
+
* [[Small_Talks/2008/April/How_to_Build_a_Rich_Excel_Report_with_ZK_Spreadsheet | How to Build a Rich Excel Report with ZK Spreadsheet]]
  
  
 
If you'd like to know more about Variable-Resolver, please refer to the following URL:
 
If you'd like to know more about Variable-Resolver, please refer to the following URL:
  
* [http://docs.zkoss.org/wiki/Using_ZK_JndiVariableResolver_-_Retrieve_Session_Beans_and_EntityManagerFactory Using ZK JndiVariableResolver - Retrieve Session Beans and EntityManagerFactory]
+
* [[Small_Talks/2007/November/Using_ZK_JndiVariableResolver_-_Retrieve_Session_Beans_and_EntityManagerFactory | Using ZK JndiVariableResolver - Retrieve Session Beans and EntityManagerFactory]]
  
 
Let's start to build an application for calculating balance sheet with Variable-Resolver.
 
Let's start to build an application for calculating balance sheet with Variable-Resolver.
Line 32: Line 32:
 
=Live Demo=
 
=Live Demo=
  
<gflash width="600" height="500">http://docs.zkoss.org/images/4/47/ZssChangeStyle.swf</gflash>
+
<gflash width="1090" height="654">ZssChangeStyle.swf</gflash>
 
 
  
 
=How to Build a Template Using Excel=
 
=How to Build a Template Using Excel=
Line 50: Line 49:
 
'''NewSheet.xls'''
 
'''NewSheet.xls'''
  
<gflash width="600" height="350'>http://docs.zkoss.org/images/3/36/InputBean.swf</gflash>
+
<gflash width="900" height="505">InputBean.swf</gflash>
 
 
  
 
=Change the Style of Spreadsheet=
 
=Change the Style of Spreadsheet=
Line 81: Line 79:
 
=Download=
 
=Download=
  
*<tracker url="http://sourceforge.net/project/downloading.php?group_id=156140&use_mirror=osdn&filename=ZssChangeStyle.war&65502387"> ZssChangeStyle.war</tracker>
+
*<tracker url="https://sourceforge.net/projects/zkforge/files/Small%20Talks/Change%20the%20Style%20of%20Spreadsheet%20within%201%20Min%202.0.0/ZssChangeStyle.war/download"> ZssChangeStyle.war</tracker>
  
 
=Conclusion=
 
=Conclusion=

Latest revision as of 08:00, 13 January 2011

DocumentationSmall Talks2008AprilChange the Style of Spreadsheet within 1 Min
Change the Style of Spreadsheet within 1 Min

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


Introduction

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

NewSheet.xls

Format.png


Define External Variable

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

NewSheet.xls

Change the Style of Spreadsheet

sheet.zul

	......
	
  <listbox id="style" mold="select" rows="1" onSelect="changeStyle()">
	<listitem label="Style 1" value="/BalanceSheet.xls"/>
	<listitem label="Style 2" value="/NewSheet.xls"/>
  </listbox>
  
	......
	
	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"/>
	
	......


Download

Conclusion

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.