Excel template translator JETT to append data to workbook based on template

409 Views Asked by At

I am using JETT to generate xls from xls template. My input data will be given in pages is there way to append data to sheet as well applying template from input xls to output workbook using Jett api's

1

There are 1 best solutions below

2
On

It is definitely possible.

You can write some script code at the beginning of your sheet (with ${{ /*your code here;*/ return '';}} . This code will get the data from the sheets using POI API and will store it in some variables. See how to access POI API from JETT Script here: http://jett.sourceforge.net/expressions/poi_objects.html ).

Once the data is stored into variables, you can insert them in sheets with standard JETT templating capabilities, by referring to the variables that you created in your script block.

Just make sure that the code block creating the variables with data lies before the place where the variables are used in your template.