Change the Style of Spreadsheet within 1 Min"
m (→Live Demo) |
Murasakiwu (talk | contribs) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 11: | Line 11: | ||
=Introduction= | =Introduction= | ||
− | In [ | + | 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: | ||
− | * [ | + | * [[Small_Talks/2008/February/New_Features_of_ZK_Spreadsheet_0.7.0 | New Features of ZK Spreadsheet 0.7.0]] |
− | * [ | + | * [[Small_Talks/2007/December/A_Preview_of_ZK_Spreadsheet_Component | A Preview of ZK Spreadsheet Component]] |
− | * [ | + | * [[Small_Talks/2007/September/A_Sip_of_the_ZK_Spreadsheet_Component | A Sip of the ZK Spreadsheet Component]] |
− | * [ | + | * [[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: | ||
− | * [ | + | * [[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=" | + | <gflash width="1090" height="654">ZssChangeStyle.swf</gflash> |
=How to Build a Template Using Excel= | =How to Build a Template Using Excel= | ||
Line 49: | Line 49: | ||
'''NewSheet.xls''' | '''NewSheet.xls''' | ||
− | <gflash width=" | + | <gflash width="900" height="505">InputBean.swf</gflash> |
=Change the Style of Spreadsheet= | =Change the Style of Spreadsheet= | ||
Line 79: | Line 79: | ||
=Download= | =Download= | ||
− | *<tracker url=" | + | *<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
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
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
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. |