Keikai works as a spreadsheet component of your web application. This project is the source code of Keikai tutorial, and it demonstrates how you can build a web application in Keikai with several examples.
Welcome to check related sites:
We assume you know Java and have Java SE Development Kit (JDK) installed before running the project. To run the project, clone the project and launch your command line interface in the keikai-tutorial folder. Execute the following commands based on your environment.
mvn jetty:run
Run the Maven wrapper below which will download everything needed for you during starting up:
- Linux / Mac
./mvnw jetty:run
- Windows
mvnw.cmd jetty:run
When you see the following messages:
...
[INFO] Started Jetty Server
[INFO] Starting scanner at interval of 5 seconds.
Then visit http://localhost:8080/tutorial with your browser. After you have finishted playing with Keikai, you can press Ctrl+c
to stop the server.
Keikai can render an xlsx file with a Excel-like web UI and a built-in toolbar. After importing the xlsx file end users can edit it in the browser with common features like changing cell content, font, color, format, formulas and so on.
There are 2 ways to interact with a database:
- Import/Export an xlsx file from/to your database:
Import: please reference the previous section [Online Spreadsheet Editor](##Online Spreadsheet Editor) where you can import xlsx file via the UI or API.
Export: All information of a book model can be exported to an .xlsx file. You can store the file in a BLOB field of a table in a database. - Populate/Store cell data from/to your database:
Populate data into spreadsheet: When displaying data from the database, you can publish data into cells withRange
setter methods into Keikai with predefined style.
Store data into database: Extract cell data or formulas you are interested withRange
getter method and insert them into a corresponding database table.
This project shows the 2nd way using Range
API to save the cell data back to the database and publish a table's data to cells. The architecture is as follows:
If you have any questions or have problem importing an Excel xlsx file, please send the file to [email protected] and request for support.
By default, this project runs with Keikai EE evaluation edition and comes with complete and advanced features such as charting, filtering and all supported formulas. If you wish to run the open source edition (OSE), follow the steps below:
- remove the dependency
keikai-ex
- uncomment the dependency (
keikai-oss
) inpom.xml
- run the project according to How to Run This Project above