Exemplo n.º 1
0
        static void RunImport <T>(int tableId) where T : class
        {
            try {
                IPowersheetImporter <T> importer = PowersheetImportFactory.Get <T>(@"Files/sheet.xlsx");
                List <T> data = importer.GetAll(tableId).ToList();

                foreach (var d in data)
                {
                    System.Console.WriteLine(d.ToString());
                    System.Console.WriteLine();
                }
            }
            catch (Exception ex) {
                System.Console.WriteLine("Oops! {0}", ex.Message);
            }
        }
Exemplo n.º 2
0
        static void RunDump <T>(int tableId)
        {
            try {
                IPowersheetImporter <T> importer = PowersheetImportFactory.Get <T>(@"Files/sheet.xlsx");
                List <T> data = importer.GetAll(tableId).ToList();

                var dumpStuff = new List <DumpClass>();
                foreach (var d in data)
                {
                    var c = new DumpClass();
                }
            }
            catch (Exception ex) {
                System.Console.WriteLine("Oops! {0}", ex.Message);
            }
        }