Jxls-2 source code is available on Github at https://github.com/jxlsteam/jxls.
Use JxlsTester for writing a template based testcase. The template file must have the name of the test class and must be in the same package in source folder ‘src/test/resources’ (e.g. /jxls-poi/src/test/resources/org/jxls/templatebasedtests/ConditionalFormattingTest.xlsx). The method processTemplate creates the output file in the target folder with _output as part of the name. Use JxlsTester.getWorkbook() for verifying the output file.
// Test JxlsTester tester = JxlsTester.xlsx(getClass()); tester.processTemplate(context); // Verify try (TestWorkbook w = tester.getWorkbook()) {
As an alternative you can use createTransformerAndProcessTemplate() instead of processTemplate() if you want to check, edit or exchange the transformer instance.
If each test method of your testclass use its own template file you can speficy the method name in the xlsx() call as the 2nd arg (example: NestedSumsTest).
Use xls() if you must use the old XLS format. Prefer the XLSX format.