diff --git a/appointment-import/src/main/java/smash/appointment/parse/XlsxCalendarProcessor.java b/appointment-import/src/main/java/smash/appointment/parse/XlsxCalendarProcessor.java index 9066b95799bd7bfded806ef23b8ad07b2300f59a..32ea800dcb6f68ccbd2e89d9dfc9a28c79412638 100644 --- a/appointment-import/src/main/java/smash/appointment/parse/XlsxCalendarProcessor.java +++ b/appointment-import/src/main/java/smash/appointment/parse/XlsxCalendarProcessor.java @@ -62,7 +62,7 @@ public class XlsxCalendarProcessor { CellParser parser = new CellParser(); parser.setSubjectDao(subjectDao); - + for (int weekOffset : weekStartRows) { Row weekRow = sheet.getRow(weekOffset + dayOfMonthRowOffset); for (int dayColumnOffset : dayColumns) { @@ -89,13 +89,16 @@ public class XlsxCalendarProcessor { } } - String query = hourRow.getCell(dayColumnOffset).getStringCellValue(); + Cell queryCell = hourRow.getCell(dayColumnOffset); + if (queryCell != null) { + String query = queryCell.getStringCellValue(); + + if (query != null && !query.isEmpty()) { + AppointmentEntry entry = parser.parseAppointment(query, hour); + entry.setDay(day); - if (query != null && !query.isEmpty()) { - AppointmentEntry entry = parser.parseAppointment(query, hour); - entry.setDay(day); - - result.add(entry); + result.add(entry); + } } } }