Open asmaier opened 3 months ago
As far as I see its not configured: https://github.com/ngs-doo/TemplaterExamples/blob/master/Intermediate/TemplaterJson/src/main/java/hr/ngs/templater/json/TemplaterJson.java#L78 So you can configure it and recompile your version
Would it be much effort to add .navigateSeparator(':', null)
to the configuration builder of the templater-json.java
and then release a new version 8.0.1
for everyone? I think it is confusing that the documentation says
"There are two built-in navigation plugins. .. at(INDEX)...top(COUNT)",
but these are not activated by default. It took me quite some digging in the documentation to see that
"Navigation plugins are disabled by default, but can be enabled if metadata separator is defined"
and that this also must be done to activate the build-in navigation plugins. The Getting started section of the documentation also seems to imply that navigation expressions are enabled by default, so I might not be the only one to stumble over this when using the command line tool templater-json.java
.
Eh, it also says just before
To enable navigation expressions, first navigation metadata must be defined
While most of the examples are using :
a lot of customers have their own versions such as /
or |
or similar. I think for now it would be easier for your to build your own version which behaves as you expect it to.
Ok, I will do that. Nevertheless here is a pull request https://github.com/ngs-doo/TemplaterExamples/pull/73 to add navigation expressions in the templater-json jar. Maybe this is useful for anyone.
I have the following
simple.json
file:and a
simple_template.xlsx
with expressions likeI run it like
java -jar templater-json.jar simple_template.xlsx simple.json simple.xlsx
But in the outputsimple.xlsx
I can only see that[[colors.name]]
gets replaced:It seems like all the navigation expressions are ignored. Am I doing something wrong here? Or are navigation expressions not supported by
templater-json.jar
?simple_template.xlsx simple.json simple.xlsx