Coder Social home page Coder Social logo

jett's Introduction

JETT - Java Excel Template Translator

JETT can be found online at http://jett.sourceforge.net.

Description

JETT is Java Excel Template Translator. Give it a Map of "beans" -- mapping variable names to your own data objects, specify a pre-existing Excel template file, and JETT will create a new Excel spreadsheet, populating your data into it. The data can come from any source. Mark up your template spreadsheet first, with JEXL Expressions (e.g. "${myVariable}") and XML-like Tags (e.g. <jt:forEach items="${myList}" var="item">) for control over how JETT translates your template spreadsheet and populates your data. You can even create your own Tags to implement custom processing logic. JETT works with .xls and .xlsx Excel files.

Example

Here is a quick example of how to use JETT:

  • Excel template spreadsheet:

+----------------+----------------+ |${var} |${var2}! | +----------------+----------------+

  • Java code to use JETT:

Map<String, Object> beans = new HashMap<String, Object>(); beans.put("var", "Hello"); beans.put("var2", "World"); ExcelTransformer transformer = new ExcelTransformer(); try { transformer.transform("template.xlsx", "result.xlsx", beans); } catch (IOException e) { System.err.println("I/O error occurred: " + e.getMessage()); } catch (InvalidFormatException e) { System.err.println("Spreadsheet was in invalid format: " + e.getMessage()); }

  • The resultant Excel spreadsheet:

+----------------+----------------+ |Hello |World! | +----------------+----------------+

Installation

To use JETT, you may download the latest distribution from http://sourceforge.net/projects/jett/files/. The only module is "jett-core". Place the "jett-core" jar library in your classpath.

See "Dependencies" below for the list of dependencies.

If you are using Maven 2+, then you may place the following dependency in your pom.xml. Since 0.3.0, JETT has been available in the Maven 2 Central Repository.

net.sf.jett jett-core 0.11.0

Dependencies

JETT can be used with Java 1.7+. JETT depends on several external libraries:

The following libraries are required, as they are used by JETT:

Build Instructions

If you would like to build JETT yourself, do the following:

  1. Get the source code. a. Download the JETT latest distribution from http://sourceforge.net/projects/jett/files/. This contains the source code from the latest release. OR b. Checkout the latest source code from the trunk using Subversion using the Subversion URL http://svn.code.sf.net/p/jett/code-0/trunk.

  2. Get Maven 2 or higher from http://maven.apache.org/ and install it.

  3. Run Maven to build JETT. mvn clean install

Contacts

For issues, bugs, suggestions, and feature requests, please send an email to the "jett-users" mailing list: [email protected].

Licensing

JETT is licensed under the "GNU Lesser General Public License Version 3" at http://www.gnu.org/copyleft/lesser.html.

Author

My name is Randy Gettman. For a while I used jXLS for translating Excel template spreadsheets using Java. At the time, jXLS suffered from poor performance when supplying lots of data. I was inspired to create JETT after this experience so that I could create spreadsheets from templates quickly, and with some features that jXLS didn't have. By the time I released JETT, jXLS had fixed a few performance issues, so they perform similarly. However, JETT has a number of features that jXLS doesn't have (jXLS has a few features that JETT doesn't (yet) have.) The bottom line is that I wanted a jXLS with more features, and JETT is the result.

jett's People

Contributors

tran4o avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.