Introduction"

From Documentation
 
(21 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{ZKSpreadsheetEssentialsPageHeader}}
+
{{ZKSpreadsheetEssentials3PageHeader}}
 +
 
 +
 
  
 
__TOC__
 
__TOC__
  
ZK Spreadsheet is an Ajax component that delivers the rich functionality of Excel as a Java Web application.
+
= Overview =
 +
 
 +
ZK Spreadsheet is an AJAX component that delivers Excel-like experience for your Java web application. It has a grid-like user interface with toolbar, formula bar, and sheet bar and it provides necessary features such as editing text and styles, merging, sorting cells and inserting, deleting, and freezing rows and columns. Spreadsheet not only supports over 75% of Excel formulas and you can even add your own ones. Some handy features like "auto fill", "auto filter", and protection are also included in Spreadsheet.
 +
 
 +
Being able to import and export Excel files are just the top of the features iceberg. Unlike other online spreadsheet such as Google Docs or Microsoft Office 2010 online suite, you can integrate ZK Spreadsheet with your enterprise back-end systems seamlessly and create collaborative and dynamic enterprise applications at minimal cost. You can call versatile Java APIs to control and configure the ZK Spreadsheet component(s). You can register event listeners so an action can be automatically triggered if any specified cell, range, or name changes. You can make cells reference to the backend Java beans, so any changes on the backend data can automatically reflect on ZK Spreadsheet. You can create your own customized formulas in Java and use them in the spreadsheet like other built-in formulas. You can even create an online spreadsheet service with ZK Spreadsheet component.
 +
 
 +
ZK Spreadsheet is an extensible, customizable, and integrable Java AJAX web spreadsheet solution, with both built-in browser AJAX user interface and back-end server side Excel-like data and logic. No ActiveX or other plug-ins are required.
 +
 
 +
= Architecture =
 +
'''Overview'''
 +
[[Image:essentials-app-architecture.png | center]]
 +
 
 +
 
 +
'''More Inner Details'''
 +
[[Image:essentials-architecture.png | center | 900px]]
 +
 
 +
ZK Spreadsheet component consists of three major parts -- the client-side UI , the server-side component, and the book data model with the formula evaluation engine. The UI is a grid like widget that you can in-place edit the content of each cell. The component is a server-side instance which your controller usually works with. The data model stores the actual Spreadsheet data. The formula evaluation engine is responsible for formula parsing and calculations.
 +
 
 +
= Using in JSP or JSF =
 +
You can use Spreadsheet in JSP  with custom tag library and interact with it by writing Javascript. Please refer to [[ZK Spreadsheet Essentials 3/Using Spreadsheet in JSP| Using Spreadsheet in JSP]] for details. For JSF, we provides a Spreadsheet JSF component which can be used within a JSF page and interact with other components by AJAX tag.  Please refer to [[ZK Spreadsheet Essentials 3/Using Spreadsheet in JSF| Using Spreadsheet in JSF]] for details.
  
Being able to import and export Excel files are just the minimum. Unlike other on-line spreadsheet such as Google Docs or Office 2010 online suite, you can integrate ZK Spreadsheet with your enterprise back-end systems seamlessly and create collaborative and dynamic enterprise applications at minimal cost. You can call versatile Java APIs to control and configure the ZK Spreadsheet component(s). You can register event listeners so an action can be automatically triggered if any specified cell, range, or name changes. You can data bind cells to the back-end Java beans, so any changes on the back-end data would be automatically reflected on the ZK Spreadsheet. You can create your own customized spreadsheet functions in Java and use them in the spreadsheet formulas. You can even create by yourselves an online spreadsheet service with ZK Spreadsheet component.
+
=Difference from 2.5.0 =
  
ZK Spreadsheet is an extensible, customizable, and integratable Java Ajax Web spreadsheet solution, with both built in browser Ajax user interface and back-end server side Excel-like data and logic. No ActiveX or other plug-ins are required.  
+
In 3.0.0, we have made some significant changes including new APIs for accessing book model, event name change, and the new way to customize toolbar handling. For complete details, please refer to [http://books.zkoss.org/wiki/Small_Talks/2013/August/ZK_Spreadsheet_3.0.0_RC:Upgrade_Notes upgrade note].
  
=Architecture=
+
=Difference from 3.0.0 =
[[Image:architecture-zss.png]]
 
  
ZK Spreadsheet component consist of three major parts -- the UI view part, the work book data model, and the formula evaluation engine. The UI part is a grid like component that you can in-place edit the contents of spreadsheet cells. The work book data model stores the actual spreadsheet data. The formula evaluation engine is responsible for spreadsheet formula parsing and calculations.
+
In 3.5.0, we introduce a brand new model implementation. This enhancement doesn't change the way you use the Spreadsheet's public API mostly, but reduces Spreadsheet's memory consumption. Also we have established a new theme mechanism that you can design your own theme with CSS and change it dynamically. We have as well designed a new Skyline theme as the default theme for the version 3.5. There are other enhancements; please refer to [http://books.zkoss.org/wiki/Small_Talks/2014/July/New_Features_of_ZK_Spreadsheet_3.5.0 upgrade note] for details.
  
=Loading a Work Book=
+
=Supported Browsers =
*ZK Spreadsheet UI component must work with a ZK Spreadsheet work book model. You can set book source URL to the UI component directly or prepare a work book model(e.g. by importing or by creating Book object) yourself and set the book to the UI component.
+
For the best user experience, we recommend using one of the following browsers:
*The ZK Spreadsheet UI will then populate itself with the work book data.
+
Internet Explorer 9 and higher, latest version of FF, Chrome, or Safari
Note that one book can be associated with several ZK Spreadsheet UI components simultaneously. Data changes to the work book will be reflected to all associated ZK Spreadsheet UI components automatically.
 
  
=Execution Flow of Serving a Cell Modification Request=
+
= Next Step =
#When an end user does some action such as inputting a new value into a cell on the browser side ZK spreadsheet widget, the widget would fire back to the server side ZK Spreadsheet UI component a ZK event  to notify the change.
+
You can [http://zssdemo.zkoss.org/zssdemo take a look at Spreadsheet demo] or
#ZK Spreadsheet UI component will then call the proper control APIs to change the workbook data model.
+
[[ZK Spreadsheet Essentials/Using Spreadsheet in ZK/Get Spreadsheet Up and Running Quickly| get Spreadsheet running at your local site]].
#The formula engine then takes over to check the formula dependency and collect associated cells that need to be updated accordingly; then publish data change event  to notify the ZK Spreadsheet UI component.
 
#Per the data change event published from the work book, the ZK Spreadsheet UI component updates itself accordingly.
 
#The change will then be reflected back to the browser widget automatically by ZK Framework.
 
  
Note that the ZK Spreadsheet work book model is not limited to be used with the ZK Spreadsheet UI component only. You can call the control APIs in your application to change the ZK Spreadsheet work book and the associated ZK Spreadsheet UI part will still be updated accordingly. Furthermore, you can even associate other ZK components to the work book's data change event queue and do something whenever the work book publish data change events.
 
  
=Download Example Codes=
 
Rest of the book goes into more details of ZK Spreadsheet. You can download all the example codes described later in this book as a web archive [http://zkbooks.googlecode.com/files/zssessentials.war here]. Deploy once and you can execute individual examples as and when you go through the book.
 
  
=Version History=
 
{{LastUpdated}}
 
{| border='1px' | width="100%"
 
! Version !! Date !! Content
 
|-
 
|  
 
|  
 
|  
 
|}
 
 
{{ZKSpreadsheetEssentialsPageFooter}}
 
{{ZKSpreadsheetEssentialsPageFooter}}

Latest revision as of 03:30, 4 September 2019





Overview

ZK Spreadsheet is an AJAX component that delivers Excel-like experience for your Java web application. It has a grid-like user interface with toolbar, formula bar, and sheet bar and it provides necessary features such as editing text and styles, merging, sorting cells and inserting, deleting, and freezing rows and columns. Spreadsheet not only supports over 75% of Excel formulas and you can even add your own ones. Some handy features like "auto fill", "auto filter", and protection are also included in Spreadsheet.

Being able to import and export Excel files are just the top of the features iceberg. Unlike other online spreadsheet such as Google Docs or Microsoft Office 2010 online suite, you can integrate ZK Spreadsheet with your enterprise back-end systems seamlessly and create collaborative and dynamic enterprise applications at minimal cost. You can call versatile Java APIs to control and configure the ZK Spreadsheet component(s). You can register event listeners so an action can be automatically triggered if any specified cell, range, or name changes. You can make cells reference to the backend Java beans, so any changes on the backend data can automatically reflect on ZK Spreadsheet. You can create your own customized formulas in Java and use them in the spreadsheet like other built-in formulas. You can even create an online spreadsheet service with ZK Spreadsheet component.

ZK Spreadsheet is an extensible, customizable, and integrable Java AJAX web spreadsheet solution, with both built-in browser AJAX user interface and back-end server side Excel-like data and logic. No ActiveX or other plug-ins are required.

Architecture

Overview

Essentials-app-architecture.png


More Inner Details

Essentials-architecture.png

ZK Spreadsheet component consists of three major parts -- the client-side UI , the server-side component, and the book data model with the formula evaluation engine. The UI is a grid like widget that you can in-place edit the content of each cell. The component is a server-side instance which your controller usually works with. The data model stores the actual Spreadsheet data. The formula evaluation engine is responsible for formula parsing and calculations.

Using in JSP or JSF

You can use Spreadsheet in JSP with custom tag library and interact with it by writing Javascript. Please refer to Using Spreadsheet in JSP for details. For JSF, we provides a Spreadsheet JSF component which can be used within a JSF page and interact with other components by AJAX tag. Please refer to Using Spreadsheet in JSF for details.

Difference from 2.5.0

In 3.0.0, we have made some significant changes including new APIs for accessing book model, event name change, and the new way to customize toolbar handling. For complete details, please refer to upgrade note.

Difference from 3.0.0

In 3.5.0, we introduce a brand new model implementation. This enhancement doesn't change the way you use the Spreadsheet's public API mostly, but reduces Spreadsheet's memory consumption. Also we have established a new theme mechanism that you can design your own theme with CSS and change it dynamically. We have as well designed a new Skyline theme as the default theme for the version 3.5. There are other enhancements; please refer to upgrade note for details.

Supported Browsers

For the best user experience, we recommend using one of the following browsers: Internet Explorer 9 and higher, latest version of FF, Chrome, or Safari

Next Step

You can take a look at Spreadsheet demo or get Spreadsheet running at your local site.



All source code listed in this book is at Github.


Last Update : 2019/09/04

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