生成Excel文件的Java类库:JETT (Java Excel Template Translator)
jopen
11年前
JETT (Java Excel Template Translator)是一个 Java 5.0 API能够快速建立Excel电子表格报表,使用Excel电子表格模板。
JETT构建在 Apache POI 类库之上,所以可以让开发人员完全控制Excel文件的创建,读取和修改。包括字体,颜色,高亮,边框,对齐,页眉/页脚等。
以下是它的主要特性:
- Integration with Apache Commons JEXL 2.1.1 (Java Expression Language). This allows for easy creation of expressions that are substituted with model data in the form of beans at runtime.
- Integration with Apache POI 3.8. JETT is built on top of the extensive Apache POI library with which it controls sheet transformations.
- Integration with the SourceForge project jAgg 0.7.0. JETT uses this library to evaluate Aggregate Expressions, a JETT-based extension to JEXL that allows aggregate expressions to be evaluated, such as Sum, Count, Avg, etc.
- Built-in Tag library that allows XML-like tags to be placed in template spreadsheets, allowing such simple programming-like constructs as “if”, “for”, “forEach”, and more.
- Looping tags support “copy down” and “copy right” behavior for the display of Collections.
- Custom Tag Libraries may be coded and supplied to JETT for execution.
- Like Apache POI, JETT attempts as much as possible to keep existing Excel features intact, including Charts, Macros, etc.
- The CellListener interface allows dynamic, custom processing of Cells, such as alternate row highlighting, value manipulation, etc.
- Merged cell regions are shifted and copied as appropriate.
- Row heights and columns widths are respected as best as possible.
- Template sheets may be dynamically cloned and separately evaluated in the resultant spreadsheet.
- Multiple collections may be implicitly processed using a single loop.
- It is possible to implement and display adjacent, or side-by-side, lists.
- Supports binary Excel (.xls) and XML Excel (.xlsx) documents.
- RichTextStrings are supported, even within Expressions.
- JETT gives access to POI Objects in JEXL Expressions, which in turn allows access to Workbook and Sheet properties, including the Header & Footer, and PageSetup objects.
- Excel Formula generation support.