javaexcelspringjxls

Can't read ZonedDateTime in excel template using JXLS lib


I have POJO with ZomedDateTime object:

public class Pojo {
  private ZonedDateTime date;
}

I use jxls lib to bound template with my pojo:

Pojo pojo = getFilledPojo;
context.putVar("pojo", pojo);

I want to show this date in me excel template. I use next expression for that:

${pojo.date.toInstant()}

I see the empty cell in the exported template. Do you have ane ideas how to fix that? I cant use Date and send timestamp to calculate it in excel


Solution

  • It seems not possible yet. I used$[DATE(${pojo.date.year},${pojo.date.monthValue},${pojo.date.dayOfMonth})] Hope it will be helpful.