Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Input Order excel path and return");
            string orderExcelPath = Console.ReadLine();

            //Console.WriteLine("Input Order excel sheet");
            string sheetName = "Press Order";

            excelApp_         = new Microsoft.Office.Interop.Excel.Application();
            excelApp_.Visible = false;

            List <OrderData> dataList;

            DataExcelManager dataManager = new DataExcelManager(excelApp_, orderExcelPath, sheetName);

            //dataManager.Test();
            dataList = dataManager.CreateList();

            Console.WriteLine("Output excel sheet");
            string outExcelPath = Console.ReadLine();

            WriteExcel(outExcelPath, dataList);

            excelApp_.Workbooks.Close();
            excelApp_.Quit();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Input Order excel path and return");
            string orderExcelPath = Console.ReadLine();

            //Console.WriteLine("Input Order excel sheet");
            string sheetName = "Press Order";

            excelApp_ = new Microsoft.Office.Interop.Excel.Application();
            excelApp_.Visible = false;

            List<OrderData> dataList;

            DataExcelManager dataManager = new DataExcelManager(excelApp_, orderExcelPath, sheetName);
            //dataManager.Test();
            dataList = dataManager.CreateList();

            Console.WriteLine("Output excel sheet");
            string outExcelPath = Console.ReadLine();

            WriteExcel(outExcelPath, dataList);

            excelApp_.Workbooks.Close();
            excelApp_.Quit();
        }