Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wurstcommander/javabean2excel
Java Bean to Excel (.xls/.xlsx) Exporter (Java Beans to Excel files Exporter / Converter)
https://github.com/wurstcommander/javabean2excel
apache excel export export-to-excel exporter java javabeans poi primefaces table xls xlxs
Last synced: about 1 month ago
JSON representation
Java Bean to Excel (.xls/.xlsx) Exporter (Java Beans to Excel files Exporter / Converter)
- Host: GitHub
- URL: https://github.com/wurstcommander/javabean2excel
- Owner: WurstCommander
- Created: 2019-05-02T19:09:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-22T10:04:34.000Z (7 months ago)
- Last Synced: 2024-10-30T12:52:19.607Z (2 months ago)
- Topics: apache, excel, export, export-to-excel, exporter, java, javabeans, poi, primefaces, table, xls, xlxs
- Language: Java
- Homepage:
- Size: 342 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bean 2 xls / Excel (Java Beans to Excel files Exporter / Converter)
Converts Java Beans to Excel files (xlxs) via Apache POI including cellformats
I got a little bit annoyed by the Primefaces datatable exporter (p:dataexporter), because it's just formating
every cell in String (which can cause problems with functions in Excel) and doesn't support files with more than 65,536 rows - So I decided to write my own exporter.I use Apache POI - the Java API for Microsoft Documents (http://poi.apache.org/)
**Fileformat:**
The default Excel 2007 and later workbook format.
In reality a ZIP compressed archive with a directory structure of XML text documents. Functions as the primary replacement for the former binary .xls format, although it does not support Excel macros for security reasons.Feel free to contribute
## Features
- Formats every cell with cell dataformat like money, decimal etc
- CellTypes
- "New" Excel Format
- Simple setup via BeanColumn - class:
BeanColumn[] columns = new BeanColumn[] {
new BeanColumn("name", "Carmodel", FormatType.TEXT),
new BeanColumn("power", "Power", FormatType.INTEGER),
new BeanColumn("priceinEuro", "Price in Euro", FormatType.MONEY) };
This simple setup transforms the attribute name to Text in Excel, priceinEuro to MONEY ("#,##0.00\\ €" = Euro) and so on.
## TODO
Implement more cell formats like percent, Date, text with wrap (+width) etc.Sincerely, your WurstCommander :)