diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/spreadsheets/StructureDefinitionSpreadsheetGenerator.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/spreadsheets/StructureDefinitionSpreadsheetGenerator.java index a5761600a..c0ac1ad7e 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/spreadsheets/StructureDefinitionSpreadsheetGenerator.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/spreadsheets/StructureDefinitionSpreadsheetGenerator.java @@ -394,8 +394,9 @@ public class StructureDefinitionSpreadsheetGenerator extends CanonicalSpreadshee } } } - sheet.setActiveCell(new CellAddress(sheet.getRow(1).getCell(0))); - + if (sheet.getLastRowNum() > 0) { + sheet.setActiveCell(new CellAddress(sheet.getRow(1).getCell(0))); + } } }