Commit 9bea00af authored by Matija Obreza's avatar Matija Obreza
Browse files

README.md

parent 7f132531
# Excel Template Merge with JSON #
This is a simple tool has two components: a bit that converts Excel
spreadsheet data into JSON and the other bit that takes an Excel
spreadsheet and fills it with data from JSON.
Putting both together allows you to create many Excel files, each using
the same Excel file as template, but filling each one with data from a
list of JSON objects. This would be similar to the Merge function in
Word, but the template is an Excel spreadsheet.
## Using the library ##
Add to your `pom.xml`
<dependency>
<groupId>org.croptrust</groupId>
<artifactId>excel-json</artifactId>
<version>0.2-SNAPSHOT</version>
</dependency>
You will need to configure JsonPath defaults somewhere in your code to set
the providers as described at https://github.com/jayway/JsonPath
Configuration.setDefaults(new Configuration.Defaults() {
private final JsonProvider jsonProvider = new JacksonJsonProvider();
private final MappingProvider mappingProvider = new JacksonMappingProvider();
@Override
public JsonProvider jsonProvider() {
return jsonProvider;
}
@Override
public MappingProvider mappingProvider() {
return mappingProvider;
}
@Override
public Set<Option> options() {
return EnumSet.noneOf(Option.class);
}
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment