示例#1
0
文件: Program.cs 项目: L0ll0/Schedine
        static void Main(string[] args)
        {
            try
            {
                Book  book  = new BinBook();
                Sheet sheet = book.addSheet("Sheet1");

                sheet.writeStr(2, 1, "Hello, World !");
                sheet.writeNum(3, 1, 1000);

                Format dateFormat = book.addFormat();
                dateFormat.setNumFormat(NumFormat.NUMFORMAT_DATE);
                sheet.writeNum(4, 1, book.datePack(2008, 4, 29), dateFormat);
                sheet.setCol(1, 1, 12);

                book.save("example.xls");

                System.Diagnostics.Process.Start("example.xls");
            }
            catch (System.Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }