Example #1
0
        public ExcelManager(string excelFilePath)
        {
            if (File.Exists(excelFilePath))
            {
                _excelDocument = new SLDocument(excelFilePath);
                FileInfo newFile = new FileInfo(excelFilePath);
                _excelPackage = new ExcelPackage(newFile);
                Reader        = new ExcelReader(_excelDocument, _excelPackage);
                Writer        = new ExcelWriter(_excelDocument);
            }
            else
            {
                _excelDocument = new SLDocument();
                Reader         = new ExcelReader(_excelDocument, null);
                Writer         = new ExcelWriter(_excelDocument);
            }

            ExcelFilePath = excelFilePath;
        }
Example #2
0
 public ExcelManager()
 {
     _excelDocument = new SLDocument();
     Reader         = new ExcelReader(_excelDocument, null);
     Writer         = new ExcelWriter(_excelDocument);
 }