The function _days_ works fine with cells containing dates as numbers but not with cells containing dates as strings with for instance a German (dd.mm.yyy) or French (dd/mm/yyyy) pattern. The root of the problem is probably in org.apache.poi.ss.usermodel.DateUtil.parseDateTime. Trying to parse with DateTimeFormatter.ISO_LOCAL_DATE first would mitigate the problem but according to my tests, a German version of Excel parses string dates in different formats.