public void Close()
 {
     if (worksheets != null)
     {
         worksheets.Dispose();
     }
 }
Example #2
0
        public ExcelWorksheet CreateAWorksheetFromTemplate(ExcelWorkbook current, string name)
        {
            ExcelWorksheets _sheets = LoadTemplates();

            current.Worksheets.Add(name, _sheets[templateWorksheetName]);
            _sheets.Dispose();
            return(current.Worksheets[name]);
        }