Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/foxcapades/kalo

Annotations for POJO to Poi Workbook serialization.
https://github.com/foxcapades/kalo

annotations java poi spreadsheet

Last synced: 22 days ago
JSON representation

Annotations for POJO to Poi Workbook serialization.

Awesome Lists containing this project

README

        

= Kalo

Annotations for converting POJOs to Workbooks through Apache Poi.

.Foo.java
[source, java]
----
class Foo {
@Poi(header="Bar")
String barVal;

Foo(String bv) {...}

@Poi
int getFizz() {...}

@Poi(index=1)
int getId() {...}
}
----

.main method
[source, java]
----
final var kalo = new Kalo();
final var items = Arrays.asList(new Foo[]{new Foo("A"), new Foo("B")});

// Create workbook:
final var workbook = kalo.xssf(items, Foo.class);

// Write out to file:
kalo.writeXssf(new File("MyWorkbook.xlsx"), items, Foo.class);
----