private void checkForWorksheetsPresent() { if (Worksheets.Count() == 0) { throw new InvalidOperationException("Workbooks need at least one worksheet."); } }