public void Close() { if (worksheets != null) { worksheets.Dispose(); } }
public ExcelWorksheet CreateAWorksheetFromTemplate(ExcelWorkbook current, string name) { ExcelWorksheets _sheets = LoadTemplates(); current.Worksheets.Add(name, _sheets[templateWorksheetName]); _sheets.Dispose(); return(current.Worksheets[name]); }