jxls
jxls copied to clipboard
IfCommand issue in jxls library
Dear all,
First of all, I would like to thank you and your team for jxls library, it really helps the community to work with excel files easier and faster.
I'm using version 3.0.0. I have a concern regarding one test: https://github.com/jxlsteam/jxls/blob/a1bb43ec3374bf302be43763964800e436c58faf/jxls-poi/src/test/java/org/jxls3/IfTest.java#L83-L109 while reviewing the jxls repository, I have noticed that if I change the data method here: https://github.com/jxlsteam/jxls/blob/a1bb43ec3374bf302be43763964800e436c58faf/jxls-poi/src/test/java/org/jxls3/IfTest.java#L98 by returning only one employee (like this):
public static List<Employee> generateSampleEmployeeData() {
try {
List<Employee> employees = new ArrayList<>();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MMM-dd", Locale.US);
employees.add( new Employee("Elsa", dateFormat.parse("1970-Jul-10"), 1500, 0.15) );
return employees;
} catch (ParseException e) {
throw new RuntimeException(e);
}
})
I'm getting this excel result:
Is it some known behavior or is it a bug? Is there any workaround for this? I'm experiencing the same behavior in my application right now, and I don't know how to fix it. I mean how to return only one row without template data, if I have "if" statement.
Thanks for your help!