Example #1
0
 protected virtual void SaveAs(ExcelFileSubjects subject)
 {
     if (Helpers.IsDirExist == true)
     {
         string fullPath = Helpers.RootPath + GetFileName(subject);
         XlWb.SaveAs(fullPath);
     }
 }
Example #2
0
        protected string GetFileName(ExcelFileSubjects subject)
        {
            string filename = "";

            switch (subject)
            {
            case ExcelFileSubjects.Brackets:
                filename = "בתים ";
                break;

            case ExcelFileSubjects.ContendersList:
                filename = "רשימת מתחרים ";
                break;

            default:
                filename = "קובץ ארכיון ";
                break;
            }

            // add uniq time
            filename = filename + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + ".xlsx";

            return(filename);
        }