public void DocumentOpened(IList<ColumnAttributes> pdfColumnsAttributes, DocumentPreferences documentPreferences) { _columns = pdfColumnsAttributes; _documentPreferences = documentPreferences; if (string.IsNullOrEmpty(WorksheetName)) throw new InvalidOperationException("Please set the WorksheetName."); _worksheet = _package.Workbook.Worksheets.Add(WorksheetName); initSettings(); printHeader(); }