Skip to content

how to insert JEXL expressions to the cell with data validation? #331

Closed Answered by kuoho
kuoho asked this question in Q&A
Discussion options

You must be logged in to vote

I have solved it,first closing the error box of the cell so that expressions text can be put in, and then call transformer to open the error box

try (InputStream is = Files.newInputStream(Paths.get("src/test/resources/templates/excel/valid_template.xlsx"));
             OutputStream os = Files.newOutputStream(Paths.get("target/valid_template_output.xlsx"))) {
            Context context = new Context(data);
            PoiTransformer transformer = PoiTransformer.createTransformer(is, os);
            Sheet sheet = transformer.getWorkbook().getSheetAt(0);
            List<? extends DataValidation> dataValidations = sheet.getDataValidations();
            for (DataValidation dataValidation …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kuoho
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant