Beispiel #1
0
        public void SaveData <T>(string fileName, AppDataFolders folder, IEnumerable <T> data, string sheetName) where T : class
        {
            string specificFile = SaveLocator.GetSaveLocation(fileName, folder);

            using (var file = FileWrapper.GetStream(specificFile, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite))
            {
                if (data.AttributesExists())
                {
                    SaveWithAttributes(data, sheetName, file);
                }
                else
                {
                    SaveWithoutAttributes(data, sheetName, file);
                }
            }
        }
Beispiel #2
0
 public AmSpaceExcelWorker()
 {
     SaveLocator = new SaveLocator();
     FileWrapper = new FileWrapper();
 }