Exemplo n.º 1
0
        public static void TransferSQLiteData()
        {
            string path         = @"..\..\..\Excel-Reports\{0}.xlsx";
            string dbPath       = @"..\..\..\..\SQLiteDB\ComputersFactory.db";
            var    excelHandler = new ExcelHandler();

            excelHandler.TransferToExcel(ReadTable(dbPath, "Computers"), string.Format(path, "Computers"), "Sheet1");
            excelHandler.TransferToExcel(ReadTable(dbPath, "Manufacturers"), string.Format(path, "Manufacturers"), "Sheet1");
            excelHandler.TransferToExcel(ReadTable(dbPath, "ComputerTypes"), string.Format(path, "ComputerTypes"), "Sheet1");
            excelHandler.TransferToExcel(ReadTable(dbPath, "Memories"), string.Format(path, "Memories"), "Sheet1");
            excelHandler.TransferToExcel(ReadTable(dbPath, "Processors"), string.Format(path, "Processors"), "Sheet1");
            excelHandler.TransferToExcel(ReadTable(dbPath, "VideoCards"), string.Format(path, "VideoCards"), "Sheet1");
        }
Exemplo n.º 2
0
 public ExcelExporter(ExcelHandler excelHandler, MySQLHandler mySqlHandler)
 {
     this.excelHandler = excelHandler;
     this.mySqlHandler = mySqlHandler;
 }