Beispiel #1
0
        public void CreateExistedFileFail()
        {
            Workbook wb = new Workbook();

            wb.CreateWorkbook();
            Worksheet ws = wb.CreateWorksheet("SomeSheet");

            wb.SaveAs(@"\\192.168.16.50\bazaotd\Давыдов Д.В\CreateTest.xlsx");
            wb.Quit();
        }
Beispiel #2
0
        public void CreateFileTest()
        {
            Workbook wb = new Workbook();

            try
            {
                wb.CreateWorkbook();
                Worksheet ws = wb.CreateWorksheet("SomeSheet");
                wb.SaveAs(@"\\192.168.16.50\bazaotd\Давыдов Д.В\CreateTest.xlsx");
            }
            catch (FileExistsException e)
            {
            }
            finally
            {
                wb.Quit();
            }
        }